change sops key file location

This commit is contained in:
ulic-youthlic 2025-01-19 23:59:14 +08:00
parent 9b9a92cd82
commit 7bebb5c060
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
2 changed files with 6 additions and 11 deletions

View file

@ -18,7 +18,7 @@
};
keyFile = lib.mkOption {
type = lib.types.nonEmptyStr;
default = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
default = "/var/sops/key.txt";
description = ''
path to age key file
'';

View file

@ -6,15 +6,10 @@
{
config = {
sops.defaultSopsFile = rootPath + "/secrets/general.yaml";
sops.age =
let
unixName = config.youthlic.home-manager.unixName;
cfg = config.users.users."${unixName}";
in
{
keyFile = "${cfg.home}/.config/sops/age/keys.txt";
sshKeyPaths = [ ];
generateKey = false;
};
sops.age = {
keyFile = "/var/sops/key.txt";
sshKeyPaths = [ ];
generateKey = false;
};
};
}