Files
nix/modules/system/sops.nix
2025-10-05 13:32:18 -05:00

24 lines
569 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;
sops.defaultSopsFormat = "yaml";
sops.age.keyFile = "/home/blake/.config/sops/age/keys.txt";
#sops.secrets.tailscale_authkey = { };
sops.secrets."tailscale_authkey" = { owner = "root"; };
};
}