init: public

This commit is contained in:
2025-04-13 15:09:14 +08:00
parent 5995c2050b
commit 50247d94e8
253 changed files with 12964 additions and 567 deletions

28
modules/sops.nix Normal file
View File

@@ -0,0 +1,28 @@
{
config,
pkgs,
lib,
username,
...
}:
lib.my.makeSwitch {
inherit config;
default = true;
optionName = "sops secret settings";
optionPath = [ "sops" ];
config' = {
sops.age.sshKeyPaths = [
"/persistent/home/${username}/.ssh/id_ed25519"
];
users.users.${username}.extraGroups = [ "keys" ];
environment.variables.SOPS_AGE_KEY_FILE = "/run/secrets.d/age-keys.txt";
my.home = {
sops.age.sshKeyPaths = [
"/persistent/home/${username}/.ssh/id_ed25519"
];
home.packages = [
pkgs.sops
];
};
};
}