27 lines
641 B
Nix
27 lines
641 B
Nix
{ pkgs, config, lib, inputs, ... }:
|
|
|
|
let
|
|
cfg = config.modules.system.sops;
|
|
in
|
|
{
|
|
imports = [ inputs.sops-nix.nixosModules.sops ];
|
|
|
|
options.modules.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";
|
|
# "blake_passwd" = lib.mkIf config.users.blake.enable {
|
|
# owner = "root";
|
|
# group = "root";
|
|
# neededForUsers = true;
|
|
# };
|
|
};
|
|
};
|
|
}
|