27 lines
780 B
Nix
Raw Normal View History

2023-11-24 19:08:21 +01:00
{ config, pkgs, ... }:
let keyFilePath = "/var/lib/sops-nix/age-key.txt";
in {
2023-11-04 02:28:27 +01:00
sops.defaultSopsFile = ./common.yaml;
2023-11-24 19:08:21 +01:00
sops.age.keyFile = keyFilePath;
2023-04-12 20:32:07 +02:00
sops.age.generateKey = true;
2023-11-04 02:28:27 +01:00
sops.secrets.wifi = { };
2023-04-12 20:32:07 +02:00
sops.secrets."${config.hostcfg.hostname}_ssh_priv" = {
mode = "0400";
owner = config.users.users.sora.name;
group = config.users.users.sora.group;
};
sops.secrets."${config.hostcfg.hostname}_ssh_pub" = {
mode = "0400";
owner = config.users.users.sora.name;
group = config.users.users.sora.group;
};
2023-11-04 02:28:27 +01:00
sops.secrets."${config.hostcfg.hostname}_wg_priv" = { };
sops.secrets."${config.hostcfg.hostname}_wg_pub" = { };
environment.systemPackages = with pkgs; [ sops ];
2023-11-24 19:08:21 +01:00
environment.sessionVariables.OPS_AGE_KEY_FILE = keyFilePath;
2023-04-12 20:32:07 +02:00
}