From 1a7858b68b3ce21b4fd2c887441b1c537fd49bd7 Mon Sep 17 00:00:00 2001 From: Natalie Date: Fri, 2 May 2025 16:13:17 -0700 Subject: [PATCH] we do a little refactoring --- hosts/desktop/configuration.nix | 2 -- hosts/laptop/configuration.nix | 4 ---- lib/mkSystem.nix | 8 ++++++++ 3 files changed, 8 insertions(+), 6 deletions(-) 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