1 Commits

Author SHA1 Message Date
andromeda
2114c6c347 rename secrets 2026-01-05 14:35:42 +01:00
11 changed files with 65 additions and 50 deletions

62
flake.lock generated
View File

@@ -180,15 +180,58 @@
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"nur",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1765835352, "lastModified": 1733312601,
"narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=", "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "a34fae9c08a15ad73f295041fec82323541400a9", "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"nvf",
"nixpkgs"
]
},
"locked": {
"lastModified": 1760948891,
"narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"stylix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1763759067,
"narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -446,9 +489,7 @@
}, },
"nur": { "nur": {
"inputs": { "inputs": {
"flake-parts": [ "flake-parts": "flake-parts",
"flake-parts"
],
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
@@ -495,9 +536,7 @@
"nvf": { "nvf": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
"flake-parts": [ "flake-parts": "flake-parts_2",
"flake-parts"
],
"mnw": "mnw", "mnw": "mnw",
"ndg": "ndg", "ndg": "ndg",
"nixpkgs": [ "nixpkgs": [
@@ -542,7 +581,6 @@
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
"flake-parts": "flake-parts",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"impermanence": "impermanence", "impermanence": "impermanence",
"nixos-mailserver": "nixos-mailserver", "nixos-mailserver": "nixos-mailserver",
@@ -561,9 +599,7 @@
"base16-helix": "base16-helix", "base16-helix": "base16-helix",
"base16-vim": "base16-vim", "base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme", "firefox-gnome-theme": "firefox-gnome-theme",
"flake-parts": [ "flake-parts": "flake-parts_3",
"flake-parts"
],
"gnome-shell": "gnome-shell", "gnome-shell": "gnome-shell",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"

View File

@@ -4,10 +4,6 @@
url = "github:ryantm/agenix"; url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@@ -25,12 +21,10 @@
nur = { nur = {
url = "github:nix-community/NUR"; url = "github:nix-community/NUR";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-parts.follows = "flake-parts";
}; };
nvf = { nvf = {
url = "github:notashelf/nvf"; url = "github:notashelf/nvf";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-parts.follows = "flake-parts";
}; };
phoenix = { phoenix = {
url = "github:celenityy/Phoenix"; url = "github:celenityy/Phoenix";
@@ -39,12 +33,10 @@
stylix = { stylix = {
url = "github:nix-community/stylix"; url = "github:nix-community/stylix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-parts.follows = "flake-parts";
}; };
}; };
outputs = inputs @ { outputs = {
agenix, agenix,
flake-parts,
home-manager, home-manager,
impermanence, impermanence,
nixos-mailserver, nixos-mailserver,
@@ -103,17 +95,10 @@
} }
noshell.nixosModules.default noshell.nixosModules.default
]); ]);
in in {
flake-parts.lib.mkFlake {inherit inputs;} (top @ { nixosConfigurations =
config,
withSystem,
moduleWithSystem,
...
}: {
systems = ["x86_64-linux"];
flake.nixosConfigurations =
builtins.mapAttrs builtins.mapAttrs
(hostname: value: configurationWithHomeManager value) (hostname: value: configurationWithHomeManager value)
machines; machines;
}); };
} }

View File

@@ -25,7 +25,7 @@
x509.useACMEHost = config.mailserver.fqdn; x509.useACMEHost = config.mailserver.fqdn;
loginAccounts = { loginAccounts = {
"test@${config.networking.domain}" = { "test@${config.networking.domain}" = {
hashedPasswordFile = builtins.toString config.age.secrets.secret3.path; hashedPasswordFile = builtins.toString config.age.secrets.mailserver-acc-test-pw.path;
}; };
}; };
}; };

View File

@@ -9,10 +9,6 @@
./impermanence.nix ./impermanence.nix
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
age.secrets = {
secret0.file = ../../secrets/secret0.age;
secret1.file = ../../secrets/secret1.age;
};
boot.loader = { boot.loader = {
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
systemd-boot.enable = true; systemd-boot.enable = true;

View File

@@ -1,9 +1,8 @@
{ {
age.secrets = { age.secrets = {
secret0.file = ./secrets/secret0.age; andromeda-pw.file = ./secrets/andromeda-pw.age;
secret1.file = ./secrets/secret1.age; mtgmonkey-pw.file = ./secrets/mtgmonkey-pw.age;
secret2.file = ./secrets/secret2.age; mailserver-acc-test-pw.file = ./secrets/mailserver-acc-test-pw.age;
secret3.file = ./secrets/secret3.age;
}; };
pub-keys = { pub-keys = {
ssh = { ssh = {

Binary file not shown.

View File

@@ -4,8 +4,7 @@ let
lenovo = pub-keys.ssh.lenovo; lenovo = pub-keys.ssh.lenovo;
_109-199-104-83 = pub-keys.ssh._109-199-104-83; _109-199-104-83 = pub-keys.ssh._109-199-104-83;
in { in {
"secret0.age".publicKeys = [andromeda lenovo]; "andromeda-pw.age".publicKeys = [andromeda lenovo];
"secret1.age".publicKeys = [andromeda lenovo]; "mtgmonkey-pw.age".publicKeys = [andromeda lenovo];
"secret2.age".publicKeys = [andromeda lenovo _109-199-104-83]; "mailserver-acc-test-pw.age".publicKeys = [andromeda lenovo _109-199-104-83];
"secret3.age".publicKeys = [andromeda lenovo _109-199-104-83];
} }

View File

@@ -13,7 +13,7 @@ in {
"andromeda" = { "andromeda" = {
isNormalUser = true; isNormalUser = true;
description = "andromeda"; description = "andromeda";
hashedPasswordFile = builtins.toString config.age.secrets.secret0.path; hashedPasswordFile = builtins.toString config.age.secrets.andromeda-pw.path;
extraGroups = [ extraGroups = [
"networkmanager" "networkmanager"
"wheel" "wheel"
@@ -22,7 +22,7 @@ in {
"mtgmonkey" = { "mtgmonkey" = {
isNormalUser = true; isNormalUser = true;
description = "mtgmonkey"; description = "mtgmonkey";
hashedPasswordFile = builtins.toString config.age.secrets.secret1.path; hashedPasswordFile = builtins.toString config.age.secrets.mtgmonkey-pw.path;
extraGroups = [ extraGroups = [
(lib.mkIf (lib.mkIf
(machine == machines.lenovo) (machine == machines.lenovo)