nix

configuration files that power my machines
Log | Files | Refs | README | LICENSE

commit e297972f907e00407d4e665e326b95997c9043f1
parent 700028f279854857953ac3cec037bf11138e1f8e
Author: mtmn <miro@haravara.org>
Date:   Wed, 17 Jun 2026 19:42:48 +0200

nix: update flakes, add new site and ignore github popups

Diffstat:
Mflake.lock | 12++++++------
Mhosts/nixaran/configuration.nix | 0
Mmodules/mixins/dotfiles/config/aerc/aerc.conf | 2+-
Mmodules/services/static.nix | 36++++++++++++------------------------
4 files changed, 19 insertions(+), 31 deletions(-)

diff --git a/flake.lock b/flake.lock @@ -162,11 +162,11 @@ ] }, "locked": { - "lastModified": 1781615165, - "narHash": "sha256-CFF4fNNfr2GZSx1xJhBNBi7VMj8OtOqZGOV+fiBSbzw=", + "lastModified": 1781729244, + "narHash": "sha256-vT1hM3l+vH1h9BHhuxkAsJmAPl6Rld7cjLVEGtHGzOA=", "owner": "nix-community", "repo": "home-manager", - "rev": "34dd288e65012954cf7170658e0e6a61255b0327", + "rev": "c51ac59e59f2a7362d71d1d01ab68b2c09d09347", "type": "github" }, "original": { @@ -248,11 +248,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1781454065, - "narHash": "sha256-d2xfDjnfRuf/xYGdu9VVRHiav/2w5hDL/5cw2TuVAXw=", + "lastModified": 1781607440, + "narHash": "sha256-rxO+uc/KFbSJp+pgyXRuAX6QlG9hJdnt0BXpEQRXY+U=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9eac87a12312b8f60dd52e1c6e1a265f6fc7f5fc", + "rev": "3e41b24abd260e8f71dbe2f5737d24122f972158", "type": "github" }, "original": { diff --git a/hosts/nixaran/configuration.nix b/hosts/nixaran/configuration.nix Binary files differ. diff --git a/modules/mixins/dotfiles/config/aerc/aerc.conf b/modules/mixins/dotfiles/config/aerc/aerc.conf @@ -30,4 +30,4 @@ text/html=pandoc -f html -t plain x-scheme-handler/http*=printf '%s' {} | wl-copy [hooks] -mail-received=[ "$AERC_ACCOUNT" = "fastmail" ] && [ "$AERC_FOLDER" != "Spam" ] && [ "$AERC_FOLDER" != "Trash" ] && notify-send -a aerc "$AERC_FROM_ADDRESS" "$AERC_SUBJECT" || true +mail-received=[ "$AERC_ACCOUNT" = "fastmail" ] && [ "$AERC_FOLDER" != "Spam" ] && [ "$AERC_FOLDER" != "Trash" ] && [ "$AERC_FROM_ADDRESS" != "notifications@github.com" ] && notify-send -a aerc "$AERC_FROM_ADDRESS" "$AERC_SUBJECT" || true diff --git a/modules/services/static.nix b/modules/services/static.nix @@ -12,11 +12,12 @@ in { options = { bucket = lib.mkOption { type = lib.types.str; - description = "S3 bucket name"; + default = ""; + description = "Garage bucket name; defaults to the domain when empty"; }; endpoint = lib.mkOption { type = lib.types.str; - description = "S3 upstream host"; + description = "Garage web endpoint (host:port); bucket is selected via the Host header"; }; extraConfig = lib.mkOption { type = lib.types.lines; @@ -31,33 +32,20 @@ in { config = lib.mkIf cfg.enable { services.caddy.virtualHosts = lib.mapAttrs' ( - domain: opt: + domain: opt: let + bucket = + if opt.bucket != "" + then opt.bucket + else domain; + in lib.nameValuePair domain { extraConfig = '' - @root path / - handle @root { - route { - rewrite * /${opt.bucket}/index.html - reverse_proxy ${opt.endpoint} - } + reverse_proxy ${opt.endpoint} { + header_up Host ${bucket} } '' - + opt.extraConfig - + '' - handle { - route { - rewrite * /${opt.bucket}{http.request.uri.path} - reverse_proxy ${opt.endpoint} { - @error status 5xx 4xx - handle_response @error { - header Location / - respond "" 302 - } - } - } - } - ''; + + opt.extraConfig; } ) cfg.domains;