19 lines
587 B
Nix
19 lines
587 B
Nix
{
|
|
user ? throw "user argument is required",
|
|
home ? throw "home argument is required",
|
|
}:
|
|
{ config, inputs, ... }:
|
|
{
|
|
environment.persistence."/persist"."${home}/.config/sops-nix/key.txt" = { };
|
|
|
|
home-manager.users.${user} = {
|
|
imports = [ inputs.sops-nix.homeManagerModules.sops ];
|
|
|
|
sops.age.keyFile = "${home}/.config/sops-nix/key.txt";
|
|
home.sessionVariables.SOPS_AGE_KEY_FILE = "${home}/.config/sops-nix/key.txt";
|
|
systemd.user.services.sops-nix.Unit.After = [
|
|
config.environment.persistence."/persist"."${home}/.config/sops-nix/key.txt".mount
|
|
];
|
|
};
|
|
}
|