Add secrets with agenix

This commit is contained in:
Jordan Holt 2023-12-03 21:59:44 +00:00
parent 16a1e0dd7f
commit bbf835d127
Signed by: jordan
GPG Key ID: B8CFFF61F1CCF520
4 changed files with 99 additions and 7 deletions

84
flake.lock generated
View File

@ -1,5 +1,47 @@
{
"nodes": {
"agenix": {
"inputs": {
"darwin": "darwin",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1701216516,
"narHash": "sha256-jKSeJn+7hZ1dZdiH1L+NWUGT2i/BGomKAJ54B9kT06Q=",
"owner": "ryantm",
"repo": "agenix",
"rev": "13ac9ac6d68b9a0896e3d43a082947233189e247",
"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"
}
},
"firefox-gnome-theme": {
"flake": false,
"locked": {
@ -17,6 +59,27 @@
}
},
"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"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"nixpkgs"
@ -38,6 +101,22 @@
}
},
"nixpkgs": {
"locked": {
"lastModified": 1677676435,
"narHash": "sha256-6FxdcmQr5JeZqsQvfinIMr0XcTyTuR7EXX0H3ANShpQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a08d6979dd7c82c4cef0dcc6ac45ab16051c1169",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1701389149,
"narHash": "sha256-rU1suTIEd5DGCaAXKW6yHoCfR1mnYjOXQFOaH7M23js=",
@ -54,9 +133,10 @@
},
"root": {
"inputs": {
"agenix": "agenix",
"firefox-gnome-theme": "firefox-gnome-theme",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_2",
"thunderbird-gnome-theme": "thunderbird-gnome-theme"
}
},

View File

@ -3,6 +3,7 @@
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.11";
agenix.url = "github:ryantm/agenix";
home-manager = {
url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs";
@ -17,7 +18,7 @@
};
};
outputs = inputs @ { self, nixpkgs, home-manager, ... }:
outputs = inputs @ { self, nixpkgs, agenix, home-manager, ... }:
let
inherit (lib) attrValues;
inherit (lib.my) mapModules mapModulesRec;
@ -44,7 +45,7 @@
nixosConfigurations = {
atlas = nixpkgs.lib.nixosSystem {
modules = [
inputs.home-manager.nixosModules.home-manager
home-manager.nixosModules.home-manager
{ nixpkgs.overlays = [ (import ./overlays/gnome.nix) ]; }
(import ./modules)
./hosts/atlas
@ -53,7 +54,7 @@
};
eos = nixpkgs.lib.nixosSystem {
modules = [
inputs.home-manager.nixosModules.home-manager
home-manager.nixosModules.home-manager
{ nixpkgs.overlays = [ (import ./overlays/gnome.nix) ]; }
(import ./modules)
./hosts/eos
@ -62,7 +63,7 @@
};
helios = nixpkgs.lib.nixosSystem {
modules = [
inputs.home-manager.nixosModules.home-manager
home-manager.nixosModules.home-manager
{ nixpkgs.overlays = [ (import ./overlays/gnome.nix) ]; }
(import ./modules)
./hosts/helios
@ -71,7 +72,8 @@
};
odyssey = nixpkgs.lib.nixosSystem {
modules = [
inputs.home-manager.nixosModules.home-manager
home-manager.nixosModules.home-manager
agenix.nixosModules.default
{ nixpkgs.overlays = [ (import ./overlays/gnome.nix) ]; }
(import ./modules)
./hosts/odyssey

10
secrets.nix Normal file
View File

@ -0,0 +1,10 @@
let
jordan = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILVHTjsyMIV4THNw6yz0OxAxGnC+41gX72UrPqTzR+OS";
users = [ jordan ];
odyssey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJre8/cjdoUnbTu0x4ClTITcq4lq+FjpEyJBbLbOlox7";
systems = [ odyssey ];
in
{
"secrets/odyssey_borg_passphrase.age".publicKeys = [ jordan odyssey ];
}

Binary file not shown.