feat: update flake.lock; update sops-nix to use ssh key

This commit is contained in:
2025-07-31 14:53:46 +08:00
parent 5da17890cb
commit 590343e5eb
24 changed files with 205 additions and 298 deletions

View File

@@ -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;
};
};
}