From 6702c31d8346a7420dcf79f645a6b735f9b89ba8 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Fri, 10 Nov 2023 11:02:21 +0100 Subject: [PATCH] [plasma] Add module --- nixos/modules-old/des/plasma/default.nix | 35 ------------------- nixos/modules/desktop/plasma/default.nix | 43 ++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 35 deletions(-) delete mode 100644 nixos/modules-old/des/plasma/default.nix create mode 100644 nixos/modules/desktop/plasma/default.nix diff --git a/nixos/modules-old/des/plasma/default.nix b/nixos/modules-old/des/plasma/default.nix deleted file mode 100644 index 10a85e6..0000000 --- a/nixos/modules-old/des/plasma/default.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - services.xserver = { - enable = true; - - displayManager = { - defaultSession = "plasmawayland"; - sddm = { - enable = true; - # https://discourse.nixos.org/t/plasma-wayland-session-not-available-from-sddm/13447/2 - settings.Wayland.SessionDir = "${pkgs.plasma5Packages.plasma-workspace}/share/wayland-sessions"; - }; - }; - - desktopManager.plasma5 = { - enable = true; - useQtScaling = true; - }; - - excludePackages = with pkgs; [ - xterm - ]; - }; - - environment.plasma5.excludePackages = with pkgs.libsForQt5; [ - elisa - okular - khelpcenter - konsole - print-manager - plasma-systemmonitor - gwenview - ]; -} diff --git a/nixos/modules/desktop/plasma/default.nix b/nixos/modules/desktop/plasma/default.nix new file mode 100644 index 0000000..39e1ab7 --- /dev/null +++ b/nixos/modules/desktop/plasma/default.nix @@ -0,0 +1,43 @@ +{ config, lib, pkgs, ... }: + +# This module is not tested at all so it might be broken! + +let + cfg = config.sisyphus.desktop.plasma; +in { + options.sisyphus.desktop.plasma.enable = lib.mkEnableOption "KDE Plasma"; + + config = lib.mkIf cfg.enable { + services.xserver = { + enable = true; + + displayManager = { + defaultSession = "plasmawayland"; + sddm = { + enable = true; + # https://discourse.nixos.org/t/plasma-wayland-session-not-available-from-sddm/13447/2 + settings.Wayland.SessionDir = "${pkgs.plasma5Packages.plasma-workspace}/share/wayland-sessions"; + }; + }; + + desktopManager.plasma5 = { + enable = true; + useQtScaling = true; + }; + + excludePackages = with pkgs; [ + xterm + ]; + }; + + environment.plasma5.excludePackages = with pkgs.libsForQt5; [ + elisa + okular + khelpcenter + konsole + print-manager + plasma-systemmonitor + gwenview + ]; + }; +}