init: public
This commit is contained in:
28
modules/sops.nix
Normal file
28
modules/sops.nix
Normal 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
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user