Files
nix/hosts/common/user/configs/console/sops/default.nix
Nikolaos Karaolidis d54df170cd Remove impermanence home-manager module
Too many bugs to deal with unfortunately.

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
2024-07-31 15:33:04 +03:00

24 lines
523 B
Nix

{
username ? throw "username argument is required",
}:
{
config,
inputs,
lib,
...
}:
let
userConfig = config.users.users.${username};
sopsKeyPath = ".config/sops-nix/key.txt";
in
{
environment.persistence."/persist".users.${username}.files = [ sopsKeyPath ];
home-manager.users.${username} = {
imports = [ inputs.sops-nix.homeManagerModules.sops ];
sops.age.keyFile = "${userConfig.home}/${sopsKeyPath}";
home.sessionVariables.SOPS_AGE_KEY_FILE = "${userConfig.home}/${sopsKeyPath}";
};
}