diff --git a/flake.lock b/flake.lock index 75c580a..a3b25cf 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,68 @@ { "nodes": { + "agenix": { + "inputs": { + "darwin": "darwin", + "home-manager": "home-manager", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1695384796, + "narHash": "sha256-TYlE4B0ktPtlJJF9IFxTWrEeq+XKG8Ny0gc2FGEAdj0=", + "owner": "ryantm", + "repo": "agenix", + "rev": "1f677b3e161d3bdbfd08a939e8f25de2568e0ef4", + "type": "github" + }, + "original": { + "owner": "ryantm", + "repo": "agenix", + "type": "github" + } + }, + "darwin": { + "inputs": { + "nixpkgs": [ + "agenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1673295039, + "narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "87b9d090ad39b25b2400029c64825fc2a8868943", + "type": "github" + }, + "original": { + "owner": "lnl7", + "ref": "master", + "repo": "nix-darwin", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "agenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1682203081, + "narHash": "sha256-kRL4ejWDhi0zph/FpebFYhzqlOBrk0Pl3dzGEKSAlEw=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "32d3e39c491e2f91152c84f8ad8b003420eab0a1", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "impermanence": { "locked": { "lastModified": 1690797372, @@ -17,23 +80,40 @@ }, "nixpkgs": { "locked": { - "lastModified": 1692339729, - "narHash": "sha256-TUK76/Pqm9qIDjEGd27Lz9EiBIvn5F70JWDmEQ4Y5DQ=", + "lastModified": 1677676435, + "narHash": "sha256-6FxdcmQr5JeZqsQvfinIMr0XcTyTuR7EXX0H3ANShpQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ae521bd4e460b076a455dca8b13f4151489a725c", + "rev": "a08d6979dd7c82c4cef0dcc6ac45ab16051c1169", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1695830400, + "narHash": "sha256-gToZXQVr0G/1WriO83olnqrLSHF2Jb8BPcmCt497ro0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8a86b98f0ba1c405358f1b71ff8b5e1d317f5db2", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-23.05", + "ref": "nixos-unstable", "type": "indirect" } }, "root": { "inputs": { + "agenix": "agenix", "impermanence": "impermanence", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" } } }, diff --git a/flake.nix b/flake.nix index 1fe08df..0fd803f 100644 --- a/flake.nix +++ b/flake.nix @@ -3,12 +3,13 @@ inputs = { - nixpkgs.url = "nixpkgs/nixos-23.05"; + nixpkgs.url = "nixpkgs/nixos-unstable"; impermanence.url = "github:nix-community/impermanence"; + agenix.url = "github:ryantm/agenix"; }; - outputs = {self, nixpkgs, impermanence}: + outputs = {self, nixpkgs, impermanence, agenix}: let customPackagesModule = {...}: { nixpkgs.overlays = @@ -18,11 +19,11 @@ ]; }; - forAllSystems = function: + forAllSystems = fun: nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-darwin" - ] (system: function nixpkgs.legacyPackages.${system}); + ] (system: fun system); in { @@ -32,15 +33,19 @@ modules = [ customPackagesModule impermanence.outputs.nixosModules.impermanence + agenix.nixosModules.default ./lib/systems/fugitive ]; }; }; - devShells = forAllSystems (pkgs: { - default = pkgs.mkShell { - buildInputs = [ pkgs.nixos-rebuild ]; - }; - }); + devShells = forAllSystems (system: + let pkgs = nixpkgs.legacyPackages.${system}; + in + { + default = with pkgs; mkShell { + buildInputs = [ nixos-rebuild agenix.packages.${system}.default ]; + }; + }); }; }