change encypt key from gnupg to age. And encrypt dae url

This commit is contained in:
ulic-youthlic 2025-01-12 17:18:01 +08:00
parent 7d52c44603
commit 991a8b4bbc
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
9 changed files with 73 additions and 44 deletions

View file

@ -16,6 +16,7 @@
++ [
./nix.nix
./home.nix
./sops.nix
];
config = {

20
nixos/modules/sops.nix Normal file
View file

@ -0,0 +1,20 @@
{
rootPath,
config,
...
}:
{
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;
};
};
}