added sops-nix
This commit is contained in:
parent
a8354d0c0d
commit
b83c4f77c7
6 changed files with 63 additions and 10 deletions
15
nixos/modules/sops/default.nix
Normal file
15
nixos/modules/sops/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ pkgs, inputs, username, hwconfig, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [sops];
|
||||
sops.defaultSopsFile = ./secrets/secrets.yaml;
|
||||
sops.defaultSopsFormat = "yaml";
|
||||
sops.age.keyFile = (if hwconfig.useImpermanence then "/persist/sops/age/keys.txt" else "/home/${username}/.config/sops/age/keys.txt");
|
||||
# This will generate a new key if the key specified above does not exist
|
||||
sops.age.generateKey = true;
|
||||
|
||||
sops.secrets = {
|
||||
"users/kylekrein" = {
|
||||
neededForUsers = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue