diff --git a/nixos/desktop/picom.nix b/nixos/desktop/picom.nix deleted file mode 100644 index 6da83570..00000000 --- a/nixos/desktop/picom.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ ... }: -{ - imports = [ - ./common.nix - ]; -} diff --git a/nixos/desktop/systemd.nix b/nixos/desktop/systemd.nix deleted file mode 100644 index 21e4dc6f..00000000 --- a/nixos/desktop/systemd.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ ... }: -{ - systemd.user.targets.tray = { - enable = true; - wantedBy = ["graphical-session.target"]; - unitConfig = { - Description = "Tray target"; - Requires="graphical-session.target"; - After="graphical-session.target"; - }; - }; -} diff --git a/nixos/desktop/i3.nix b/nixos/desktop/xfce-bare.nix similarity index 58% rename from nixos/desktop/i3.nix rename to nixos/desktop/xfce-bare.nix index 95cef7c7..392f93db 100644 --- a/nixos/desktop/i3.nix +++ b/nixos/desktop/xfce-bare.nix @@ -1,25 +1,22 @@ -{ ... }: +{ pkgs, ... }: { imports = [ ./common.nix ./xserver.nix - ./picom.nix ]; services.xserver = { + enable = true; desktopManager = { xterm.enable = false; xfce = { enable = true; - noDesktop = true; enableXfwm = false; + noDesktop = true; }; }; - displayManager = { - defaultSession = "none+i3"; - lightdm.enable = true; - }; - windowManager.i3 = { - enable = true; - }; + }; + programs.i3lock = { + enable = true; + package = pkgs.i3lock-fancy; }; } diff --git a/nixos/desktop/xfce-bspwm.nix b/nixos/desktop/xfce-bspwm.nix new file mode 100644 index 00000000..f9c067f1 --- /dev/null +++ b/nixos/desktop/xfce-bspwm.nix @@ -0,0 +1,13 @@ +{ ... }: +{ + imports = [ + ./xfce-bare.nix + ./sddm.nix + ]; + services.xserver = { + windowManager.bspwm.enable = true; + displayManager = { + defaultSession = "xfce+bspwm"; + }; + }; +} diff --git a/nixos/desktop/xfce-i3.nix b/nixos/desktop/xfce-i3.nix new file mode 100644 index 00000000..b8e9fc85 --- /dev/null +++ b/nixos/desktop/xfce-i3.nix @@ -0,0 +1,13 @@ +{ ... }: +{ + imports = [ + ./xfce-bare.nix + ./sddm.nix + ]; + services.xserver = { + windowManager.i3.enable = true; + displayManager = { + defaultSession = "xfce+i3"; + }; + }; +} diff --git a/nixos/desktop/xfce.nix b/nixos/desktop/xfce.nix index 08a51775..fb05f19b 100644 --- a/nixos/desktop/xfce.nix +++ b/nixos/desktop/xfce.nix @@ -5,20 +5,11 @@ ./xserver.nix ./sddm.nix ]; - environment.systemPackages = with pkgs; [ - nitrogen - ]; services.xserver = { enable = true; - desktopManager.xterm.enable = false; - desktopManager.xfce = { - enable = true; - enableXfwm = false; - noDesktop = true; - }; - windowManager.bspwm.enable = true; + desktopManager.xfce.enable = true; displayManager = { - defaultSession = "xfce+bspwm"; + defaultSession = "xfce"; sessionCommands = '' [ -f "$HOME/.config/nitrogen/bg-saved.cfg" ]\ && ${pkgs.nitrogen}/bin/nitrogen --restore\ diff --git a/nixos/desktop/xserver.nix b/nixos/desktop/xserver.nix index ee2777d4..6bb7c47d 100644 --- a/nixos/desktop/xserver.nix +++ b/nixos/desktop/xserver.nix @@ -2,7 +2,6 @@ { imports = [ ./common.nix - ./systemd.nix ]; services.xserver = { enable = true; diff --git a/nixos/home-manager/env/bspwm.nix b/nixos/home-manager/env/bspwm.nix index 5412b8db..cad7fded 100644 --- a/nixos/home-manager/env/bspwm.nix +++ b/nixos/home-manager/env/bspwm.nix @@ -1,4 +1,4 @@ -{ ... }: +{ pkgs, ... }: { xsession.windowManager.bspwm = { enable = true; @@ -14,7 +14,7 @@ pointer_action3 = "resize_corner"; }; monitors = { - "primary" = ["I" "II" "III" "IV"]; + "primary" = [ "I" "II" "III" "IV" "V" "VI" "VII" "VIII" "IX" "X" ]; }; rules = { "Xfce4-terminal".state = "floating"; @@ -27,5 +27,15 @@ focus = false; }; }; + extraConfig = '' + [ -f "$HOME/.config/nitrogen/bg-saved.cfg" ]\ + && ${pkgs.nitrogen}/bin/nitrogen --restore\ + || ${pkgs.nitrogen}/bin/nitrogen --set-auto $HOME/.dotfiles/wallpaper/images_dark/5120x2880.png --save + ${pkgs.xorg.xinput}/bin/xinput set-button-map "Logitech USB Receiver Mouse" 3 2 1 + ${pkgs.polybar}/bin/polybar-msg cmd quit + echo "---" | tee -a /tmp/polybar.log + ${pkgs.polybar}/bin/polybar 2>&1 | tee -a /tmp/polybar.log & disown + echo "Bars launched..." + ''; }; } diff --git a/nixos/home-manager/env/config/polybar/polybar.ini b/nixos/home-manager/env/config/polybar/polybar.ini index 546be343..d9293244 100644 --- a/nixos/home-manager/env/config/polybar/polybar.ini +++ b/nixos/home-manager/env/config/polybar/polybar.ini @@ -82,7 +82,7 @@ module-margin = 1 separator = | separator-foreground = ${colors.disabled} -font-0 = Fira Code Nerd Font;2 +font-0 = FiraCode Nerd Font;2 modules-left = xworkspaces xwindow modules-right = filesystem alsa xkeyboard memory cpu wlan eth date @@ -92,11 +92,9 @@ cursor-scroll = ns-resize enable-ipc = true -; tray-position = right - -; wm-restack = bspwm - -; override-redirect = true +tray-position = right +wm-restack = bspwm +override-redirect = false [module/xworkspaces] type = internal/xworkspaces diff --git a/nixos/home-manager/packages/default.nix b/nixos/home-manager/packages/default.nix index cdd6c89a..b20d5594 100644 --- a/nixos/home-manager/packages/default.nix +++ b/nixos/home-manager/packages/default.nix @@ -24,6 +24,7 @@ extraFlags = [ "--quiet" "--ignore-missing" + "--noask" ]; keys = [ "id_rsa" diff --git a/nixos/vanguard-xenia.nix b/nixos/vanguard-xenia.nix index 7e36530d..5414268e 100644 --- a/nixos/vanguard-xenia.nix +++ b/nixos/vanguard-xenia.nix @@ -4,7 +4,7 @@ imports = [ ./common.nix ./locales/en_GB.nix - ./desktop/xfce.nix + ./desktop/xfce-bspwm.nix ]; networking.hostName = "Vanguard"; # Define your hostname.