From 891f8de7357f875939251a2fbac0f31fd6cc46a0 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 12 Jul 2023 17:29:01 -0600 Subject: [PATCH] [NixOS] Move xmonad config into its own module --- nixos/desktop.nix | 25 ------------------------- nixos/full.nix | 1 + nixos/machines/biskcomp.nix | 4 +++- nixos/xmonad.nix | 37 +++++++++++++++++++++++++++++++++++++ 4 files changed, 41 insertions(+), 26 deletions(-) create mode 100644 nixos/xmonad.nix diff --git a/nixos/desktop.nix b/nixos/desktop.nix index ebf8568a..dc941d71 100644 --- a/nixos/desktop.nix +++ b/nixos/desktop.nix @@ -4,12 +4,6 @@ ./fonts.nix inputs.home-manager.nixosModule ]; - nixpkgs.overlays = with inputs; [ - xmonad.overlay - xmonad-contrib.overlay - notifications-tray-icon.overlay - (import ../dotfiles/config/xmonad/overlay.nix) - ] ++ taffybar.overlays; services.autorandr.enable = true; @@ -20,17 +14,6 @@ desktopManager = { plasma5.enable = true; }; - windowManager = { - session = [ - { - name = "xmonad"; - start = '' - /usr/bin/env imalison-xmonad & - waitPID=$! - ''; - } - ]; - }; displayManager = { sddm = { enable = true; @@ -64,14 +47,6 @@ xorg.xwininfo xsettingsd - # Haskell Desktop - haskellPackages.xmonad - haskellPackages.imalison-xmonad - haskellPackages.notifications-tray-icon - haskellPackages.gtk-sni-tray - haskellPackages.status-notifier-item - haskellPackages.dbus-hslogger - # Desktop alacritty betterlockscreen diff --git a/nixos/full.nix b/nixos/full.nix index d278b4bb..42bdc9b5 100644 --- a/nixos/full.nix +++ b/nixos/full.nix @@ -5,6 +5,7 @@ ./arm-incompatible.nix ./games.nix ./desktop.nix + ./xmonad.nix ./code.nix ./extra.nix ./internet-computer.nix diff --git a/nixos/machines/biskcomp.nix b/nixos/machines/biskcomp.nix index 0bfea4d7..74cc18bb 100644 --- a/nixos/machines/biskcomp.nix +++ b/nixos/machines/biskcomp.nix @@ -2,6 +2,9 @@ imports = [ ../internet-computer.nix ../raspberry-pi.nix + ../desktop.nix + ../xmonad.nix + ../code.nix ]; services.xrdp.enable = true; @@ -23,7 +26,6 @@ }; networking.hostName = "biskcomp"; - # hardware.video.hidpi.enable = true; system.stateVersion = "21.05"; } diff --git a/nixos/xmonad.nix b/nixos/xmonad.nix new file mode 100644 index 00000000..516ecc7f --- /dev/null +++ b/nixos/xmonad.nix @@ -0,0 +1,37 @@ +{ config, pkgs, options, inputs, ... }: +{ + nixpkgs.overlays = with inputs; [ + xmonad.overlay + xmonad-contrib.overlay + notifications-tray-icon.overlay + (import ../dotfiles/config/xmonad/overlay.nix) + ] ++ taffybar.overlays; + + services.xserver = { + windowManager = { + session = [ + { + name = "xmonad"; + start = '' + /usr/bin/env imalison-xmonad & + waitPID=$! + ''; + } + ]; + }; + }; + + environment.systemPackages = with pkgs; [ + # Haskell Desktop + haskellPackages.xmonad + haskellPackages.imalison-xmonad + haskellPackages.notifications-tray-icon + haskellPackages.gtk-sni-tray + haskellPackages.status-notifier-item + haskellPackages.dbus-hslogger + ]; + + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.imalison = (import ./home-manager.nix) inputs; +}