nixos-configs/common/modules/global.nix
matt1432 20dac8791e
All checks were successful
Discord / discord commits (push) Has been skipped
refactor: limit use of with lib
2024-01-22 11:09:37 -05:00

23 lines
480 B
Nix

{
config,
lib,
nixpkgs,
...
}: let
inherit (config.sops.secrets) access-token;
inherit (lib) hasAttr optionalString;
in {
# Minimize dowloads of indirect nixpkgs flakes
nix = {
registry.nixpkgs.flake = nixpkgs;
nixPath = ["nixpkgs=${nixpkgs}"];
extraOptions =
optionalString (hasAttr "sops" config)
"!include ${access-token.path}";
};
# Global hm settings
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}