{ 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"; }; }