added system to dirs
This commit is contained in:
30
modules/system/sops/default.nix
Normal file
30
modules/system/sops/default.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ pkgs, config, lib, inputs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.system.sops;
|
||||
in
|
||||
{
|
||||
imports = [ inputs.sops-nix.nixosModules.sops ];
|
||||
|
||||
options.system.sops = {
|
||||
enable = lib.mkEnableOption "enables sops";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# enable and configure sops for secrets
|
||||
sops = {
|
||||
defaultSopsFile = ../../secrets/secrets.yaml;
|
||||
defaultSopsFormat = "yaml";
|
||||
# age.keyFile = "/home/blake/.config/sops/age/keys.txt";
|
||||
age.keyFile = "/etc/sops/keys.txt";
|
||||
|
||||
secrets = {
|
||||
"blake_passwd" = lib.mkIf config.users.blake.enable {
|
||||
owner = "root";
|
||||
group = "root";
|
||||
neededForUsers = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user