From 0240531a02d10ca36ee6095e874007a0fe18f471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20R=C3=B6ger?= Date: Sun, 29 Mar 2026 18:04:00 +0200 Subject: [PATCH] System Gen147 @ 2026-03-29-18:04:00 by jonas@monolith --- hosts/monolith/configuration.nix | 2 ++ modules/desktop/plasma.nix | 50 +++++++++++++++++++++----------- 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/hosts/monolith/configuration.nix b/hosts/monolith/configuration.nix index 9f43f1d..0f047fe 100644 --- a/hosts/monolith/configuration.nix +++ b/hosts/monolith/configuration.nix @@ -49,6 +49,8 @@ ]; # hive modules + hive.plasma.enable = true; + hive.plasma.autologin = "jonas"; hive.kwallet.enable = true; hive.kwallet.forUsers = ["jonas"]; hive.virt-manager.enable = true; diff --git a/modules/desktop/plasma.nix b/modules/desktop/plasma.nix index 8a1547b..c3ebf05 100644 --- a/modules/desktop/plasma.nix +++ b/modules/desktop/plasma.nix @@ -1,22 +1,38 @@ { - flake.nixosModules.plasma = {pkgs, ...}: { - services.xserver.enable = true; - services.xserver = { - xkb.layout = "de"; - xkb.variant = ""; - xkb.options = "caps:ctrl_modifier"; + flake.nixosModules.plasma = { + config, + pkgs, + lib, + ... + }: let + cfg = config.hive.plasma; + in { + options.hive.plasma = { + enable = lib.mkEnableOption "Enable Plasma 6 desktop environment"; + autologin = lib.mkOption { + type = lib.types.nullOr lib.types.str; + default = null; + description = "The autologin username or null for no autologin."; + }; }; - services.displayManager.sddm = { - enable = true; - wayland.enable = true; - }; - services.desktopManager.plasma6.enable = true; - xdg.portal = { - enable = true; - extraPortals = with pkgs; [ - kdePackages.xdg-desktop-portal-kde - xdg-desktop-portal-gtk - ]; + + config = lib.mkIf cfg.enable { + services.displayManager = { + autoLogin.enable = cfg.autologin != null; + autoLogin.user = cfg.autologin; + sddm = { + enable = true; + wayland.enable = true; + }; + }; + services.desktopManager.plasma6.enable = true; + xdg.portal = { + enable = true; + extraPortals = with pkgs; [ + kdePackages.xdg-desktop-portal-kde + xdg-desktop-portal-gtk + ]; + }; }; }; }