feat: update flake.lock; update sops-nix to use ssh key
This commit is contained in:
@@ -14,25 +14,21 @@ in
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
};
|
||||
sshKeyPath = lib.mkOption {
|
||||
sshKeyFile = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "${config.my.persist.location}/home/${username}/.ssh/id_ed25519";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
sops.age.sshKeyPaths = [
|
||||
cfg.sshKeyPath
|
||||
];
|
||||
sops.age.sshKeyFile = cfg.sshKeyFile;
|
||||
users.users.${username}.extraGroups = [ "keys" ];
|
||||
environment.variables.SOPS_AGE_KEY_FILE = "/run/secrets.d/age-keys.txt";
|
||||
my.home = {
|
||||
sops.age.sshKeyPaths = [
|
||||
cfg.sshKeyPath
|
||||
];
|
||||
sops.age.sshKeyFile = cfg.sshKeyFile;
|
||||
home.packages = [
|
||||
pkgs.sops
|
||||
];
|
||||
home.sessionVariables.SOPS_AGE_SSH_PRIVATE_KEY_FILE = cfg.sshKeyFile;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user