From d4ecb788243173344ec6cd79d92c58e4b20daaf5 Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Thu, 27 Mar 2025 00:58:41 +0800 Subject: [PATCH] refactor: move stylix to module --- systems/default.nix | 16 +--------------- systems/modules/stylix.nix | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 15 deletions(-) create mode 100644 systems/modules/stylix.nix diff --git a/systems/default.nix b/systems/default.nix index 32367f7..e1ac61e 100644 --- a/systems/default.nix +++ b/systems/default.nix @@ -31,26 +31,12 @@ } ] (lib.optionals (type == "desktop") [ - ../themes/cursors/banana-cursor.nix - ../themes/darkviolet.nix - ../themes/fonts/sauce-code-pro.nix ./modules/hardware/audio.nix ./modules/hardware/bluetooth.nix ./modules/programs/getty.nix ./modules/programs/hyprland.nix ./modules/programs/hyprlock.nix - inputs.stylix.nixosModules.stylix - { - # Enable basic fonts for reasonable Unicode coverage - fonts.enableDefaultPackages = true; - - stylix = { - enable = true; - image = ../../media/wallpaper.jpg; - homeManagerIntegration.autoImport = false; - homeManagerIntegration.followSystem = false; - }; - } + ./modules/stylix.nix ]) (lib.optionals (hostname == "nemesis") [ ./hw-nemesis.nix diff --git a/systems/modules/stylix.nix b/systems/modules/stylix.nix new file mode 100644 index 0000000..c595896 --- /dev/null +++ b/systems/modules/stylix.nix @@ -0,0 +1,21 @@ +{ inputs, ... }: +let + toImport = [ + ../../themes/cursors/banana-cursor.nix + ../../themes/darkviolet.nix + ../../themes/fonts/sauce-code-pro.nix + ]; +in +{ + imports = [ inputs.stylix.nixosModules.stylix ] ++ toImport; + + # Enable basic fonts for reasonable Unicode coverage + fonts.enableDefaultPackages = true; + + stylix = { + enable = true; + image = ../../media/wallpaper.jpg; + homeManagerIntegration.autoImport = false; + homeManagerIntegration.followSystem = false; + }; +}