about summary refs log tree commit diff
path: root/modules/sops.nix
blob: 2b6cdefab143d13ff6225f39efe7cf2fff04e203 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ config, lib, inputs, ... }:

with lib;
let
  cfg = config.modules.sops;
in
{
  imports = [ inputs.sops-nix.nixosModules.sops ];

  options.modules.sops = {
    enable = mkEnableOption "sops secret manager";

    secretsDir = mkOption { type = lib.types.path; };
  };

  config = mkIf cfg.enable {
    sops.defaultSopsFile = "${cfg.secretsDir}/secrets.yaml";
  };
}