parent
e8fff0bbd3
commit
c43560ff95
35 changed files with 411 additions and 427 deletions
nixosModules/base/common-nix
31
nixosModules/base/common-nix/default.nix
Normal file
31
nixosModules/base/common-nix/default.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
self: {
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) hasAttr mkIf optionalString;
|
||||
|
||||
inherit (self.inputs) nixpkgs;
|
||||
inherit (config.sops.secrets) access-token;
|
||||
|
||||
cfg = config.roles.base;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
# 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;
|
||||
};
|
||||
|
||||
# For accurate stack trace
|
||||
_file = ./default.nix;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue