From 03f03eee9f8417b540f0d1b0d1e8a4626d455ac3 Mon Sep 17 00:00:00 2001 From: schererleander Date: Mon, 3 Nov 2025 00:19:09 +0100 Subject: chore: reorganize modules into subcategories --- lib/default.nix | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) (limited to 'lib/default.nix') diff --git a/lib/default.nix b/lib/default.nix index 6ad0a1f..a020b20 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -11,29 +11,16 @@ in username, system, overlays ? [ ], - sharedModules ? [ ], extraModules ? [ ], extraSpecialArgs ? { }, }: let darwinHost = isDarwin system; builder = if darwinHost then inputs.nix-darwin.lib.darwinSystem else inputs.nixpkgs.lib.nixosSystem; - hmModule = - if darwinHost then - inputs.home-manager.darwinModules.home-manager - else - inputs.home-manager.nixosModules.home-manager; hostDir = ../hosts/${host}; hostCfg = hostDir + /configuration.nix; - hostHome = hostDir + /home.nix; - - hmEnabled = builtins.pathExists hostHome; nixpkgsModule = { - nix.settings.experimental-features = [ - "nix-command" - "flakes" - ]; nixpkgs.overlays = overlays; nixpkgs.config.allowUnfree = true; }; @@ -41,28 +28,9 @@ in modules = [ hostCfg nixpkgsModule + (if darwinHost then inputs.home-manager.darwinModules.home-manager else inputs.home-manager.nixosModules.home-manager) ] ++ lib.optionals darwinHost [ inputs.mac-app-util.darwinModules.default ] - ++ lib.optionals hmEnabled [ - hmModule - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.backupFileExtension = "backup"; - home-manager.extraSpecialArgs = { - inherit - inputs - system - host - username - ; - } - // extraSpecialArgs; - home-manager.users.${username} = import hostHome; - home-manager.sharedModules = - sharedModules ++ lib.optional darwinHost inputs.mac-app-util.homeManagerModules.default; - } - ] ++ extraModules; in builder { -- cgit v1.3.1