From 7353edd59401c3dfe69dc32ee13ddee551eae7e3 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 22:48:46 +0100 Subject: [PATCH] adds agenix --- Justfile | 8 +- flake.lock | 108 ++++++++++++++++++++++++-- modules/hosts/dnsc-server/default.nix | 8 +- 3 files changed, 111 insertions(+), 13 deletions(-) diff --git a/Justfile b/Justfile index c493abe..8096d30 100644 --- a/Justfile +++ b/Justfile @@ -1,8 +1,8 @@ -deploy host: - nixos-rebuild switch --flake .#{{host}} +deploy: + nixos-rebuild switch --flake . -debug host: - nixos-rebuild switch --flake .#{{host}} --show-trace --verbose +debug: + nixos-rebuild switch --flake . --show-trace --verbose dry host: nix build .#nixosConfigurations.{{host}}.config.system.build.toplevel --dry-run --no-link diff --git a/flake.lock b/flake.lock index 5de2b6a..24f5719 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,48 @@ { "nodes": { + "agenix": { + "inputs": { + "darwin": "darwin", + "home-manager": "home-manager", + "nixpkgs": "nixpkgs", + "systems": "systems" + }, + "locked": { + "lastModified": 1770165109, + "narHash": "sha256-9VnK6Oqai65puVJ4WYtCTvlJeXxMzAp/69HhQuTdl/I=", + "owner": "ryantm", + "repo": "agenix", + "rev": "b027ee29d959fda4b60b57566d64c98a202e0feb", + "type": "github" + }, + "original": { + "owner": "ryantm", + "repo": "agenix", + "type": "github" + } + }, + "darwin": { + "inputs": { + "nixpkgs": [ + "agenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1744478979, + "narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "43975d782b418ebf4969e9ccba82466728c2851b", + "type": "github" + }, + "original": { + "owner": "lnl7", + "ref": "master", + "repo": "nix-darwin", + "type": "github" + } + }, "dms": { "inputs": { "nixpkgs": [ @@ -85,6 +128,27 @@ } }, "home-manager": { + "inputs": { + "nixpkgs": [ + "agenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1745494811, + "narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_2": { "inputs": { "nixpkgs": [ "nixpkgs" @@ -141,6 +205,22 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1754028485, + "narHash": "sha256-IiiXB3BDTi6UqzAZcf2S797hWEPCRZOwyNThJIYhUfk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "59e69648d345d6e8fef86158c555730fa12af9de", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1772525000, "narHash": "sha256-JVA3N5t5II0xI9+sJ44UgaN6tMrZGOox0w2xZzKYt9Q=", @@ -153,7 +233,7 @@ "url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz" } }, - "nixpkgs_2": { + "nixpkgs_3": { "locked": { "lastModified": 1770380644, "narHash": "sha256-P7dWMHRUWG5m4G+06jDyThXO7kwSk46C1kgjEWcybkE=", @@ -172,8 +252,8 @@ "nixvim": { "inputs": { "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_2", - "systems": "systems_2" + "nixpkgs": "nixpkgs_3", + "systems": "systems_3" }, "locked": { "lastModified": 1772402258, @@ -213,13 +293,14 @@ }, "root": { "inputs": { + "agenix": "agenix", "dms": "dms", "flake-parts": "flake-parts", "helium": "helium", - "home-manager": "home-manager", + "home-manager": "home-manager_2", "import-tree": "import-tree", "nix-darwin": "nix-darwin", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "nixpkgs-lib": [ "nixpkgs" ], @@ -256,9 +337,24 @@ "type": "github" } }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "utils": { "inputs": { - "systems": "systems" + "systems": "systems_2" }, "locked": { "lastModified": 1731533236, diff --git a/modules/hosts/dnsc-server/default.nix b/modules/hosts/dnsc-server/default.nix index 7d7e199..495200b 100644 --- a/modules/hosts/dnsc-server/default.nix +++ b/modules/hosts/dnsc-server/default.nix @@ -6,7 +6,7 @@ in flake.nixosConfigurations.${hostname} = inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = with config.flake.modules.nixos; [ - agenix.nixosModules.default + inputs.agenix.nixosModules.default home-manager base git @@ -21,8 +21,6 @@ in { imports = [ ./_hardware-configuration.nix ]; - samba-share.path = "/main/share"; - samba-share.allowedHosts = "192.168.178. 127.0.0.1 localhost"; networking.hostName = hostname; system.stateVersion = "24.11"; @@ -35,6 +33,10 @@ in file = ../../secrets/restic/password.age; }; }; + + # Options for my custom modules + samba-share.path = "/main/share"; + samba-share.allowedHosts = "192.168.178. 127.0.0.1 localhost"; } ]; };