fix: put empty string if doesn't have secrets
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-01-09 13:28:14 -05:00
parent 77643378cc
commit 2330fe3104

View file

@ -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