dotfiles/common/systemModules/sops.nix

25 lines
477 B
Nix
Raw Normal View History

2024-10-02 16:36:52 -04:00
{ NAME }: { config, inputs, ... }: {
imports = [
inputs.sops-nix.nixosModules.sops
];
sops = {
defaultSopsFile = ../../secrets.yaml;
defaultSopsFormat = "yaml";
age = {
keyFile = "/home/${NAME}/.config/sops/age/keys.txt";
};
secrets = {
password = {
neededForUsers = true;
};
};
};
users = {
users = {
"${NAME}" = {
hashedPasswordFile = config.sops.secrets.password.path;
};
};
};
}