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,
|
||||
...
|
||||
}:
|
||||
with lib; {
|
||||
with lib; let
|
||||
inherit (config.sops.secrets) access-token;
|
||||
in {
|
||||
# Minimize dowloads of indirect nixpkgs flakes
|
||||
nix = {
|
||||
registry.nixpkgs.flake = nixpkgs;
|
||||
nixPath = ["nixpkgs=${nixpkgs}"];
|
||||
extraOptions = optionalAttrs (hasAttr "sops" config) ''
|
||||
!include ${config.sops.secrets.access-token.path}
|
||||
'';
|
||||
extraOptions =
|
||||
if (hasAttr "sops" config)
|
||||
then "!include ${access-token.path}"
|
||||
else "";
|
||||
};
|
||||
|
||||
# Global hm settings
|
||||
|
|
Loading…
Reference in a new issue