From 8e74e41b42d9c1f137fd7581bae9b931b0eb9732 Mon Sep 17 00:00:00 2001 From: chaos Date: Mon, 27 Jan 2025 18:10:01 +0000 Subject: [PATCH] update flake & port changes --- flake.lock | 24 +++++++++---------- .../containers/storage/storage.nix | 5 +++- outputs.nix | 3 +++ scripts/deploy/hetzner-arm.sh | 9 ++++++- 4 files changed, 27 insertions(+), 14 deletions(-) diff --git a/flake.lock b/flake.lock index 86e6cd9..fbb6780 100644 --- a/flake.lock +++ b/flake.lock @@ -86,11 +86,11 @@ ] }, "locked": { - "lastModified": 1735053786, - "narHash": "sha256-Gm+0DcbUS338vvkwyYWms5jsWlx8z8MeQBzcnIDuIkw=", + "lastModified": 1737968762, + "narHash": "sha256-xiPARGKwocaMtv+U/rgi+h2g56CZZEmrcl7ldRaslq8=", "owner": "nix-community", "repo": "home-manager", - "rev": "35b98d20ca8f4ca1f6a2c30b8a2c8bb305a36d84", + "rev": "e1ae908bcc30af792b0bb0a52e53b03d2577255e", "type": "github" }, "original": { @@ -157,11 +157,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1734649271, - "narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=", + "lastModified": 1737885589, + "narHash": "sha256-Zf0hSrtzaM1DEz8//+Xs51k/wdSajticVrATqDrfQjg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507", + "rev": "852ff1d9e153d8875a83602e03fdef8a63f0ecf8", "type": "github" }, "original": { @@ -189,11 +189,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1734649271, - "narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=", + "lastModified": 1737885589, + "narHash": "sha256-Zf0hSrtzaM1DEz8//+Xs51k/wdSajticVrATqDrfQjg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507", + "rev": "852ff1d9e153d8875a83602e03fdef8a63f0ecf8", "type": "github" }, "original": { @@ -226,11 +226,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1735130532, - "narHash": "sha256-efntkb+ydFSI2kvLn6SURQEp4KnThRGZ2eeJHiKL93o=", + "lastModified": 1737998387, + "narHash": "sha256-auIDxsaNjVqBwrnAyYWPd/aY8Oyc5qe2B2vl1CzFkG4=", "owner": "nix-community", "repo": "NUR", - "rev": "b9f4b07220fa430240dba1825cdac9d673dedf55", + "rev": "3f8d4d1fc14ae265867721618b5ba57c9f5172fc", "type": "github" }, "original": { diff --git a/hosts/hetzner-arm/containers/storage/storage.nix b/hosts/hetzner-arm/containers/storage/storage.nix index 3b2acea..67aebbc 100644 --- a/hosts/hetzner-arm/containers/storage/storage.nix +++ b/hosts/hetzner-arm/containers/storage/storage.nix @@ -72,7 +72,10 @@ in { networking.firewall = { enable = true; - allowedTCPPorts = flatten attrValues (attrValues ports); + allowedTCPPorts = flatten [ + (attrValues ports.webdav) + (attrValues ports.http) + ]; }; home-manager.users.root.home.stateVersion = "25.05"; diff --git a/outputs.nix b/outputs.nix index b7da082..febe60e 100644 --- a/outputs.nix +++ b/outputs.nix @@ -37,6 +37,9 @@ in nix nix-tree nix-output-monitor + nixos-install + nixos-enter + nixos-rebuild ]) ++ (with self.packages."${system}"; [ mk-enc-usb diff --git a/scripts/deploy/hetzner-arm.sh b/scripts/deploy/hetzner-arm.sh index e714d7b..2aef039 100755 --- a/scripts/deploy/hetzner-arm.sh +++ b/scripts/deploy/hetzner-arm.sh @@ -6,4 +6,11 @@ cd $(git rev-parse --show-toplevel) DEFAULT_HOST="root@hetzner-arm.servers.genderfucked.monster" TARGET_HOST=${HOST:-${DEFAULT_HOST}} -nixos-rebuild switch --flake .#hetzner-arm --target-host "$TARGET_HOST" --no-build-nix --fast --use-substitutes -s "$@" \ No newline at end of file + +if command -v nom &> /dev/null; then + nixos-rebuild switch --flake .#hetzner-arm --target-host "$TARGET_HOST" --no-build-nix --fast --use-substitutes -s --keep-failed --log-format internal-json -v |& nom --json +else + echo "Install nix-output-monitor for better output" + nixos-rebuild switch --flake .#hetzner-arm --target-host "$TARGET_HOST" --no-build-nix --fast --use-substitutes -s "$@" +fi +