From b981d8d00fdf99377fccaa4f788089a97306c3f1 Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Mon, 8 Apr 2024 01:15:52 +0200 Subject: [PATCH] Add agenix to prepare secrets support --- flake.lock | 63 ++++++++++++++++++++++++++++++++++++++++ flake.nix | 8 +++++ home/default.nix | 1 + home/programs/agenix.nix | 7 +++++ 4 files changed, 79 insertions(+) create mode 100644 home/programs/agenix.nix diff --git a/flake.lock b/flake.lock index a0bbfd1..e7ae84b 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,52 @@ { "nodes": { + "agenix": { + "inputs": { + "darwin": "darwin", + "home-manager": [ + "home-manager" + ], + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems" + }, + "locked": { + "lastModified": 1712079060, + "narHash": "sha256-/JdiT9t+zzjChc5qQiF+jhrVhRt8figYH29rZO7pFe4=", + "owner": "ryantm", + "repo": "agenix", + "rev": "1381a759b205dff7a6818733118d02253340fd5e", + "type": "github" + }, + "original": { + "owner": "ryantm", + "repo": "agenix", + "type": "github" + } + }, + "darwin": { + "inputs": { + "nixpkgs": [ + "agenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1700795494, + "narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d", + "type": "github" + }, + "original": { + "owner": "lnl7", + "ref": "master", + "repo": "nix-darwin", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -54,10 +101,26 @@ }, "root": { "inputs": { + "agenix": "agenix", "home-manager": "home-manager", "nix-flatpak": "nix-flatpak", "nixpkgs": "nixpkgs" } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index eedcba9..bea7ce6 100644 --- a/flake.nix +++ b/flake.nix @@ -9,6 +9,12 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + agenix = { + url = "github:ryantm/agenix"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.home-manager.follows = "home-manager"; + }; + nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.4.1"; }; @@ -16,6 +22,7 @@ self, nixpkgs, home-manager, + agenix, nix-flatpak, ... }: @@ -33,6 +40,7 @@ modules = [ ./hosts/${s.name} home-manager.nixosModules.home-manager + agenix.nixosModules.default (import ./home/common-home-manager.nix { inherit inputs; }) ]; }; diff --git a/home/default.nix b/home/default.nix index ede8783..1660e04 100644 --- a/home/default.nix +++ b/home/default.nix @@ -2,6 +2,7 @@ { imports = [ + ./programs/agenix.nix ./programs/shell.nix ./programs/git.nix # ./programs/emacs.nix diff --git a/home/programs/agenix.nix b/home/programs/agenix.nix new file mode 100644 index 0000000..e3ad7a7 --- /dev/null +++ b/home/programs/agenix.nix @@ -0,0 +1,7 @@ +{ pkgs, agenix, ... }: + +{ + home.packages = [ + agenix.packages."${pkgs.system}".default + ]; +} \ No newline at end of file