update packages

This commit is contained in:
mjallen18
2025-12-19 14:49:44 -06:00
parent e8fcf96253
commit 66fe87dd23
14 changed files with 63 additions and 48 deletions

View File

@@ -6,7 +6,7 @@
...
}:
let
git-token = (if config.${namespace}.sops.enable then config.sops.secrets."github-token".path else "error");
git-token = config.sops.secrets."github-token".path;
update-checker = pkgs.writeScriptBin "update-checker" ''
#!/usr/bin/env nix-shell
@@ -271,7 +271,21 @@ let
'';
in
{
config = lib.mkIf config.${namespace}.sops.enable {
config = {
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}"
'';
};
};
home.packages = [ update-checker ];
};
}