Files
nix-config/modules/home/sops/default.nix
2025-12-19 14:49:44 -06:00

29 lines
565 B
Nix

{
config,
lib,
namespace,
...
}:
let
cfg = config.${namespace}.sops;
in
{
imports = [ ./options.nix ];
config = lib.mkIf cfg.enable {
sops = {
age.keyFile = "/home/${config.${namespace}.user.name}/.config/sops/age/keys.txt";
defaultSopsFile = "/etc/nixos/secrets/secrets.yaml";
validateSopsFiles = false;
# secrets = {
# "github-token" = { };
# };
# templates = {
# ".env".content = ''
# GITHUB_TOKEN = "${config.sops.placeholder.github-token}"
# '';
# };
};
};
}