From b3c8f55c6906c43ea83c7d2cee638e910f027ba2 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Thu, 29 Aug 2024 01:39:40 -0400 Subject: [PATCH] meta: Merge dwm specialization with desktop Long-term this could be an optional separate module but for now having dwm as a backup to Hyprland is reassuring. --- modules/desktop.nix | 30 ++++++++++++++++++++++++------ specializations/dwm.nix | 41 ----------------------------------------- 2 files changed, 24 insertions(+), 47 deletions(-) delete mode 100644 specializations/dwm.nix diff --git a/modules/desktop.nix b/modules/desktop.nix index c674fedd..a36ea1fa 100644 --- a/modules/desktop.nix +++ b/modules/desktop.nix @@ -21,7 +21,6 @@ let inherit (cfg) bloat - dwm container opacity fontSize @@ -58,7 +57,6 @@ in }; bloat = mkEnableOption "GUI applications"; - dwm = mkEnableOption "dwm specialization"; container = mkEnableOption "disable some options for container performance"; graphical = mkEnableOption "xserver for graphical containers"; }; @@ -93,9 +91,33 @@ in mountOnMedia = true; }; + libinput = { + touchpad = { + naturalScrolling = true; + accelProfile = "flat"; + accelSpeed = "0.75"; + }; + + mouse = { + accelProfile = "flat"; + }; + }; + xserver = mkIf (!container || graphical) { enable = true; excludePackages = with pkgs; [ xterm ]; + + displayManager.startx.enable = mkIf (!container) true; + + windowManager.dwm = mkIf (!container) { + enable = true; + + package = pkgs.callPackage ../packages/xland.nix (with config.lib.stylix.colors.withHashtag; { + colorBackground = base00; + colorText = base03; + colorSelected = base05; + }); + }; }; pipewire = { @@ -276,9 +298,5 @@ in }; }; }; - - specialisation = { - dwm = mkIf dwm { configuration.imports = [ ../specializations/dwm.nix ]; }; - }; }; } diff --git a/specializations/dwm.nix b/specializations/dwm.nix deleted file mode 100644 index b49f87f8..00000000 --- a/specializations/dwm.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: - -{ - services = { - xserver = { - displayManager.startx.enable = true; - - windowManager.dwm = { - enable = true; - - package = pkgs.callPackage ../packages/xland.nix (with config.lib.stylix.colors.withHashtag; { - colorBackground = base00; - colorText = base03; - colorSelected = base05; - }); - }; - }; - - libinput = { - touchpad = { - naturalScrolling = true; - accelProfile = "flat"; - accelSpeed = "0.75"; - }; - - mouse = { - accelProfile = "flat"; - }; - }; - - greetd.settings = { - default_session.command = lib.mkForce "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd startx --time-format '%F %R'"; - initial_session.command = lib.mkForce "${pkgs.xorg.xinit}/bin/startx"; - }; - }; -}