add sops module

This commit is contained in:
2025-10-05 11:04:24 -05:00
parent a741884642
commit c6e2c781de

22
modules/system/sops.nix Normal file
View File

@@ -0,0 +1,22 @@
{ pkgs, config, lib, inputs ... }:
{
imports =[ inputs.sops-nix.nixosModules.sops ];
options = {
modules.system.sops.enable = lib.mkEnableOption "enables ssh";
};
config = lib.mkIf config.modules.system.sops.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.example-key = { };
sops.secrets."tailscale_authkey" = {
owner = "root";
};
};
}