diff --git a/flake.nix b/flake.nix index 3a622267..3b689dc3 100644 --- a/flake.nix +++ b/flake.nix @@ -104,6 +104,7 @@ graphical = mkNixOsGraphical { inherit pkgs; background = "pan-wire-3.png"; + use-display-manager = false; }; networking = mkNixOsNetworking { inherit pkgs; }; @@ -166,6 +167,7 @@ graphical = mkNixOsGraphical { inherit pkgs; background = "pan-wire-3.png"; + use-display-manager = true; }; coral = let diff --git a/nixos/graphical.nix b/nixos/graphical.nix index 60e8da90..32a68851 100644 --- a/nixos/graphical.nix +++ b/nixos/graphical.nix @@ -1,14 +1,18 @@ { pkgs, background-image ? "pan-wire-3.png", + use-display-manager, ... }: +let start-plasma-shortcut = pkgs.writeScriptBin "desktop" '' + ${pkgs.plasma-workspace}/libexec/plasma-dbus-run-session-if-needed ${pkgs.plasma-workspace}/bin/startplasma-wayland +''; +in { - # Enable the X11 windowing system. - services.xserver = { enable = true; - displayManager.lightdm.enable = true; + + displayManager.lightdm.enable = use-display-manager; xkb = { layout = "fox"; @@ -22,11 +26,11 @@ }; }; - hardware.opengl.enable = true; - services.desktopManager.plasma6.enable = true; services.displayManager.defaultSession = "plasma"; + hardware.opengl.enable = true; + console.useXkbConfig = true; sound.enable = false; # let pipewire handle sound @@ -51,5 +55,6 @@ firefox glxinfo + start-plasma-shortcut ]; }