Squash merge sops-nix into main
This commit is contained in:
parent
135df24a36
commit
21fc0ee318
15 changed files with 180 additions and 17 deletions
|
|
@ -26,5 +26,6 @@
|
|||
../tmux.nix
|
||||
../users.nix
|
||||
../ca.nix
|
||||
../sops-nix.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,5 +16,6 @@
|
|||
../users.nix
|
||||
../tmux.nix
|
||||
../ca.nix
|
||||
../sops-nix.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
25
system/modules/sops-nix.nix
Normal file
25
system/modules/sops-nix.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ config, ... }:
|
||||
let
|
||||
defaultSopsFile = ../.. + "/system/dev/${config.networking.hostName}/secret.yaml";
|
||||
ageKeyFile = "/var/lib/sops-nix/key.txt";
|
||||
in
|
||||
{
|
||||
sops = {
|
||||
defaultSopsFile = defaultSopsFile;
|
||||
|
||||
age = {
|
||||
keyFile = ageKeyFile;
|
||||
};
|
||||
|
||||
secrets = {
|
||||
"wireguard/privateKey" = { };
|
||||
"wireguard/conf" = { };
|
||||
"nextcloud/adminPassword" = { };
|
||||
"step_ca/password" = { };
|
||||
};
|
||||
};
|
||||
|
||||
environment.variables = {
|
||||
SOPS_AGE_KEY_FILE = ageKeyFile;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,14 +1,12 @@
|
|||
{
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
configPath = "/etc/wireguard/wg0.conf";
|
||||
in
|
||||
{
|
||||
networking = {
|
||||
firewall = {
|
||||
allowedUDPPorts = [ 51820 ];
|
||||
};
|
||||
wg-quick.interfaces.wg0.configFile = configPath;
|
||||
wg-quick.interfaces.wg0.configFile = config.sops.secrets."wireguard/conf".path;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue