fix: put empty string if doesn't have secrets
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
77643378cc
commit
2330fe3104
1 changed files with 7 additions and 4 deletions
|
@ -4,14 +4,17 @@
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; {
|
with lib; let
|
||||||
|
inherit (config.sops.secrets) access-token;
|
||||||
|
in {
|
||||||
# Minimize dowloads of indirect nixpkgs flakes
|
# Minimize dowloads of indirect nixpkgs flakes
|
||||||
nix = {
|
nix = {
|
||||||
registry.nixpkgs.flake = nixpkgs;
|
registry.nixpkgs.flake = nixpkgs;
|
||||||
nixPath = ["nixpkgs=${nixpkgs}"];
|
nixPath = ["nixpkgs=${nixpkgs}"];
|
||||||
extraOptions = optionalAttrs (hasAttr "sops" config) ''
|
extraOptions =
|
||||||
!include ${config.sops.secrets.access-token.path}
|
if (hasAttr "sops" config)
|
||||||
'';
|
then "!include ${access-token.path}"
|
||||||
|
else "";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Global hm settings
|
# Global hm settings
|
||||||
|
|
Loading…
Reference in a new issue