diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index d2b50480c86e73e86289465ba89ca83ae6eb2829..dfa4ffb938a9f85b8d8f6c7c6012ea58c250b31c 100644 --- a/hosts/desktop/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -7,8 +7,6 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix - - ../../modules/nixos ]; programs = { gamemode.enable = true; diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 63e34a4343d6cf1f875cf9bc4ed94b4d3d183118..3208c09b726a49ded4e8b4ac71fea1dc6d9629d5 100644 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -3,10 +3,6 @@ userSettings, ... }: { - imports = [ - ../../modules/macos - ]; - environment.systemPackages = with pkgs; [ neovim pinentry_mac diff --git a/lib/mkSystem.nix b/lib/mkSystem.nix index d1302fc6e8fb6e99591b183be4c115ae9031be45..e3da27f198a3ea7abe2f2276f92bdeb36e17e7e2 100644 --- a/lib/mkSystem.nix +++ b/lib/mkSystem.nix @@ -20,6 +20,11 @@ then inputs.stylix.darwinModules.stylix else inputs.stylix.nixosModules.stylix; + systemModuleDir = + if darwin + then "macos" + else "nixos"; + systemSettings = rec { inherit darwin; host = @@ -70,6 +75,9 @@ in #shared modules ../modules/shared + #system specific modules + ../modules/${systemModuleDir} + # Link to config.nix hostConfig