diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index d2b5048..dfa4ffb 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 63e34a4..3208c09 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 d1302fc..e3da27f 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