mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2025-12-04 15:00:13 +01:00
feat: write cursed function so that secrets are host-based
This commit is contained in:
parent
83ea9f4916
commit
fdc031ea4d
1 changed files with 15 additions and 4 deletions
|
|
@ -2,18 +2,29 @@
|
|||
pkgs,
|
||||
inputs,
|
||||
username,
|
||||
host,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ inputs.sops-nix.nixosModules.sops ];
|
||||
|
||||
sops = {
|
||||
defaultSopsFile = ../../secrets/secrets.yaml;
|
||||
defaultSopsFile = ../../secrets/${host}/secrets.yaml;
|
||||
defaultSopsFormat = "yaml";
|
||||
age.keyFile = "/home/${username}/.config/sops/age/keys.txt";
|
||||
secrets = {
|
||||
secrets =
|
||||
if (host == "violet") then
|
||||
{
|
||||
"systemMailerPassword" = { };
|
||||
};
|
||||
"forgejoWorkerSecret" = { };
|
||||
"matrixRegistrationSecret" = { };
|
||||
}
|
||||
else if (host == "sakura") then
|
||||
{
|
||||
"systemMailerPassword" = { };
|
||||
}
|
||||
else
|
||||
{ };
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue