dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
commit 2fe64e0a469416b29886222d1615bd663924b5cd parent c7f507fff14cf7cbf45db36948f9aad2645c736e Author: maydayv7 <maydayv7@gmail.com> Date: Fri, 13 Sep 2024 10:56:41 +0530 feat: Add XORG Specialisation
Diffstat:
| M | files/gnome/settings/extensions.nix | | | 4 | +++- |
| M | modules/gui/desktop/gnome/default.nix | | | 8 | ++++++++ |
| M | modules/gui/xorg.nix | | | 6 | ++++++ |
| M | modules/hardware/boot.nix | | | 1 | + |
| M | modules/hardware/virtualisation/default.nix | | | 2 | +- |
| M | scripts/nixos.nix | | | 11 | ++++++++++- |
6 files changed, 29 insertions(+), 3 deletions(-)
diff --git a/files/gnome/settings/extensions.nix b/files/gnome/settings/extensions.nix @@ -15,12 +15,13 @@ {package = gamemode-indicator-in-system-settings;} {package = gsconnect;} {package = guillotine;} + {package = hide-minimized;} {package = media-progress;} {package = overview-hover;} {package = removable-drive-menu;} - {package = transparent-top-bar;} {package = unmess;} {package = window-state-manager;} + {package = x11-gestures;} {package = xlanguagetray;} { package = workspace-indicator; @@ -388,6 +389,7 @@ ++ optionals sys.gui.fancy [ {package = wiggle;} {package = rounded-window-corners-reborn;} + {package = transparent-top-bar;} { package = panel-corners; settings.panel-corners = false; diff --git a/modules/gui/desktop/gnome/default.nix b/modules/gui/desktop/gnome/default.nix @@ -256,5 +256,13 @@ in { ]; }; }) + + ## XORG Configuration + (mkIf (desktop == "gnome") { + specialisation.xorg.configuration.services = { + touchegg.enable = true; + displayManager.defaultSession = mkForce "gnome-xorg"; + }; + }) ]); } diff --git a/modules/gui/xorg.nix b/modules/gui/xorg.nix @@ -19,5 +19,11 @@ # Driver Settings videoDrivers = ["modesetting"]; }; + + # System Specialisation + specialisation.xorg.configuration = { + system.nixos.tags = ["xorg"]; + gui.wayland.enable = lib.mkForce false; + }; }; } diff --git a/modules/hardware/boot.nix b/modules/hardware/boot.nix @@ -55,6 +55,7 @@ in { # Debug specialisation.recovery.configuration = { + system.nixos.tags = ["recovery"]; boot = { initrd.verbose = mkForce true; plymouth.enable = mkForce false; diff --git a/modules/hardware/virtualisation/default.nix b/modules/hardware/virtualisation/default.nix @@ -32,7 +32,7 @@ in { user.persist.directories = [".config/libvirt" ".local/share/libvirt"]; environment.persist.directories = ["/var/lib/libvirt"]; security.virtualisation.flushL1DataCache = "cond"; - specialisation."VFIO".configuration.hardware.vm.vfio = true; + specialisation.vfio.configuration.hardware.vm.vfio = true; boot = { kernelModules = ["kvm-amd" "kvm-intel"]; extraModprobeConfig = '' diff --git a/scripts/nixos.nix b/scripts/nixos.nix @@ -44,6 +44,7 @@ with files; let apply = '' # Usage # + 'specialisation' - Activates Specified System Specialisation --activate [ home ] - Activates Current [ Home ] Configuration --boot - Applies Configuration on boot --delta - Shows Package Delta for Build @@ -175,7 +176,15 @@ in ;; esac ;; - *) error "Unknown Option '$2'" "${usage.apply}";; + *) + SPECIALISATIONS=$(ls -1 /nix/var/nix/profiles/system/specialisation) + if grep -wq "$2" <<<"$SPECIALISATIONS" &> /dev/null + then + sudo nixos-rebuild switch --specialisation "$2" + else + error "Unknown Option '$2'\n${usage.apply}" "# Available Specialisations #\n$SPECIALISATIONS" + fi + ;; esac ;; "cache")