30 lines
571 B
Nix
30 lines
571 B
Nix
{
|
|
config,
|
|
inputs,
|
|
pkgs,
|
|
...
|
|
}:
|
|
{
|
|
imports = [ inputs.sops-nix.nixosModules.sops ];
|
|
|
|
environment = {
|
|
persistence."/persist"."/etc/ssh/ssh_host_ed25519_key" = { };
|
|
|
|
systemPackages = with pkgs; [
|
|
sops
|
|
age
|
|
ssh-to-age
|
|
];
|
|
};
|
|
|
|
sops = {
|
|
defaultSopsFile = ../../../../. + "/${config.networking.hostName}/secrets/secrets.yaml";
|
|
|
|
age = {
|
|
generateKey = true;
|
|
sshKeyPaths = [ config.environment.persistence."/persist"."/etc/ssh/ssh_host_ed25519_key".source ];
|
|
keyFile = "/var/lib/sops-nix/key.txt";
|
|
};
|
|
};
|
|
}
|