nixos-laptop/nixos/sops.nix

22 lines
415 B
Nix

{
inputs,
pkgs,
self,
config,
lib,
...
}: let
cfg = config.pim.sops;
in {
imports = [inputs.sops-nix.nixosModules.sops];
options.pim.sops.enable = lib.mkEnableOption "sops";
config = lib.mkIf cfg.enable {
environment.systemPackages = [pkgs.sops];
sops = {
age.keyFile = "/home/pim/.config/sops/age/keys.txt";
defaultSopsFile = "${self}/secrets/secrets.yaml";
};
};
}