update packages
This commit is contained in:
@@ -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 ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -15,14 +15,14 @@ in
|
||||
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}"
|
||||
'';
|
||||
};
|
||||
# secrets = {
|
||||
# "github-token" = { };
|
||||
# };
|
||||
# templates = {
|
||||
# ".env".content = ''
|
||||
# GITHUB_TOKEN = "${config.sops.placeholder.github-token}"
|
||||
# '';
|
||||
# };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user