2024-10-26 18:33:47 +00:00
|
|
|
{
|
|
|
|
inputs,
|
|
|
|
pkgs,
|
2024-11-11 19:43:36 +00:00
|
|
|
self,
|
2024-10-27 11:23:20 +00:00
|
|
|
config,
|
|
|
|
lib,
|
2024-10-26 18:33:47 +00:00
|
|
|
...
|
2024-10-27 11:23:20 +00:00
|
|
|
}: let
|
|
|
|
cfg = config.pim.sops;
|
|
|
|
in {
|
2024-10-26 18:33:47 +00:00
|
|
|
imports = [inputs.sops-nix.nixosModules.sops];
|
2024-10-27 11:23:20 +00:00
|
|
|
options.pim.sops.enable = lib.mkEnableOption "sops";
|
2024-10-26 18:24:13 +00:00
|
|
|
|
2024-10-27 11:23:20 +00:00
|
|
|
config = lib.mkIf cfg.enable {
|
2024-11-11 20:57:58 +00:00
|
|
|
environment.systemPackages = [pkgs.sops];
|
2024-10-26 18:24:13 +00:00
|
|
|
|
2024-10-27 11:23:20 +00:00
|
|
|
sops = {
|
|
|
|
age.keyFile = "/home/pim/.config/sops/age/keys.txt";
|
2024-11-11 19:43:36 +00:00
|
|
|
defaultSopsFile = "${self}/secrets/secrets.yaml";
|
2024-10-27 11:23:20 +00:00
|
|
|
};
|
2024-10-26 18:24:13 +00:00
|
|
|
};
|
|
|
|
}
|