summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-06-12 18:46:14 +0200
committerRory& <root@rory.gay>2024-07-04 14:45:02 +0200
commitdf79ef9b9cfc0230935864b820b4cfaf30afafff (patch)
tree5526609fbee0aca7610ba24c0e931586e29b4984
parentAdd portable config, some updates (diff)
downloadRory-Open-Architecture-df79ef9b9cfc0230935864b820b4cfaf30afafff.tar.xz
Desktop changes
-rw-r--r--host/Rory-desktop/configuration.nix51
-rw-r--r--host/Rory-desktop/optional/gui/wayland.nix39
-rw-r--r--host/Rory-desktop/optional/gui/x11.nix26
3 files changed, 69 insertions, 47 deletions
diff --git a/host/Rory-desktop/configuration.nix b/host/Rory-desktop/configuration.nix
index 42176d0..ed4f501 100644
--- a/host/Rory-desktop/configuration.nix
+++ b/host/Rory-desktop/configuration.nix
@@ -14,6 +14,9 @@
       # hardware-specific imports
       ./optional/hardware-specific/amd.nix
 
+      ./optional/gui/x11.nix
+      ./optional/gui/wayland.nix
+
       ./printing.nix
       ./ollama.nix
     ];
@@ -71,42 +74,11 @@
     xserver = {
       enable = true;
       updateDbusEnvironment = true;
-      #videoDrivers = ["amdgpu"]; #"nvidia"
-      #desktopManager.gnome.enable = true;
       libinput.enable = true;
       layout = "us";
-      windowManager.i3.enable = true;
-      windowManager.i3.extraSessionCommands = ''
-        # output from arandr:
-        #xrandr --output DP-1 --mode 1920x1080 --pos 3840x1080 --rotate normal --output HDMI-1 --mode 3840x2160 --pos 0x0 --rotate normal --output HDMI-2 --off --output DP-2 --off
-        xrandr --output HDMI-1 --mode 3840x2160 --pos 0x0 --rotate normal --primary --output DP-1 --mode 1920x1080 --pos 3840x1080 --rotate normal --output HDMI-2 --off --output DP-2 --off
-        ${pkgs.polybarFull}/bin/polybar &
-        ${pkgs.dunst}/bin/dunst &
-        ${pkgs.feh}/bin/feh --no-fehbg --bg-fill ${../../modules/users/Rory/wallpaper.webp}
-      '';
       wacom.enable = true;
     };
-    picom.enable = true;
-    picom.vSync = false;
-    picom.backend = "glx";
-    #gnome = {
-    #  core-developer-tools.enable = false;
-    #  core-utilities.enable = false;
-    #  tracker-miners.enable = false;
-    #  tracker.enable = false;
-    #  sushi.enable = false;
-    #  rygel.enable = false;
-    #  gnome-user-share.enable = false;
-    #  gnome-remote-desktop.enable = false;
-    #  gnome-online-miners.enable = lib.mkForce false;
-    #  gnome-online-accounts.enable = false;
-    #  gnome-initial-setup.enable = false;
-    #  gnome-browser-connector.enable = false;
-    #  games.enable = false;
-    #  gnome-keyring.enable = lib.mkForce false;
-    #  evolution-data-server.enable = lib.mkForce false;
-    #  at-spi2-core.enable = lib.mkForce false;
-    #};
+    
     openssh = {
       enable = true;
       extraConfig = ''
@@ -125,21 +97,6 @@
 
   sound.enable = true;
 
-  users.users = {
-    Rory = {
-      isNormalUser = true;
-      extraGroups = [ "wheel" ];
-      packages = with pkgs; [
-        #gimp-with-plugins
-
-        #xterm
-        #gnomeExtensions.vitals
-        #gnomeExtensions.runcat
-      ];
-      initialPassword = "password";
-    };
-  };
-
   environment.systemPackages = with pkgs; [
     libreoffice
     qt6.qtwayland
diff --git a/host/Rory-desktop/optional/gui/wayland.nix b/host/Rory-desktop/optional/gui/wayland.nix
new file mode 100644
index 0000000..e0394d3
--- /dev/null
+++ b/host/Rory-desktop/optional/gui/wayland.nix
@@ -0,0 +1,39 @@
+{ config, pkgs, lib, ... }:
+
+{
+  programs.sway = {
+    enable = true;
+
+    wrapperFeatures.gtk = true;
+    extraSessionCommands = ''
+      # -- Wayland fixes
+      # SDL:
+      export SDL_VIDEODRIVER=wayland
+      # QT (needs qt5.qtwayland in systemPackages):
+      export QT_QPA_PLATFORM=wayland-egl
+      export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
+      # Fix for some Java AWT applications (e.g. Android Studio),
+      # use this if they aren't displayed properly:
+      export _JAVA_AWT_WM_NONREPARENTING=1
+      (
+        sleep 5
+        ${pkgs.swaybg}/bin/swaybg -i ${../../../../modules/users/Rory/wallpaper.webp}
+        #$ {pkgs.swayidle}/bin/swayidle -w timeout 300 'swaylock -f -i ${../../../../modules/users/Rory/wallpaper.webp}' 'swaymsg "output * dpms off"'
+        #$ {pkgs.swaylock}/bin/swaylock -f -i ${../../../../modules/users/Rory/wallpaper.webp}
+        ${pkgs.waybar}/bin/waybar
+      ) &
+    '';
+
+    extraPackages = with pkgs; [
+      swaybg
+      #swayidle
+      #swaylock
+      waybar
+      wl-clipboard
+      grim
+      slurp
+    ];
+  };
+
+}
+
diff --git a/host/Rory-desktop/optional/gui/x11.nix b/host/Rory-desktop/optional/gui/x11.nix
new file mode 100644
index 0000000..4bf9fe4
--- /dev/null
+++ b/host/Rory-desktop/optional/gui/x11.nix
@@ -0,0 +1,26 @@
+{ config, pkgs, lib, nhekoSrc, mtxclientSrc, ... }:
+
+{
+  imports =
+    [ ];
+
+  services = {
+    xserver = {
+      windowManager.i3.enable = true;
+      windowManager.i3.extraSessionCommands = ''
+        # output from arandr:
+        #xrandr --output DP-1 --mode 1920x1080 --pos 3840x1080 --rotate normal --output HDMI-1 --mode 3840x2160 --pos 0x0 --rotate normal --output HDMI-2 --off --output DP-2 --off
+        xrandr --output HDMI-1 --mode 3840x2160 --pos 0x0 --rotate normal --primary --output DP-1 --mode 1920x1080 --pos 3840x1080 --rotate normal --output HDMI-2 --off --output DP-2 --off
+        ${pkgs.polybarFull}/bin/polybar &
+        ${pkgs.dunst}/bin/dunst &
+        ${pkgs.feh}/bin/feh --no-fehbg --bg-fill ${../../../../modules/users/Rory/wallpaper.webp}
+      '';
+    };
+
+    picom.enable = true;
+    picom.vSync = false;
+    picom.backend = "glx";
+  };
+
+}
+