nixos-configs/common/modules/global.nix
matt1432 2330fe3104
All checks were successful
Discord / discord commits (push) Has been skipped
fix: put empty string if doesn't have secrets
2024-01-09 13:28:14 -05:00

24 lines
456 B
Nix

{
config,
lib,
nixpkgs,
...
}:
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 =
if (hasAttr "sops" config)
then "!include ${access-token.path}"
else "";
};
# Global hm settings
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}