Feat/mibook boot desktop choice #4

Merged
finn.markwitz merged 2 commits from feat/mibook-boot-desktop-choice into main 2026-07-27 09:55:47 +02:00
2 changed files with 32 additions and 11 deletions
Showing only changes of commit 7e4407a1f8 - Show all commits
+1
View File
@@ -6,6 +6,7 @@ in
{ {
my.profiles = { my.profiles = {
kde-desktop.enable = true; kde-desktop.enable = true;
kde-desktop.startOnBoot = false;
zsh.enable = true; zsh.enable = true;
apps = { apps = {
desktop_apps = true; desktop_apps = true;
+31 -11
View File
@@ -11,17 +11,37 @@ in
{ {
options.my.profiles.kde-desktop = with lib; { options.my.profiles.kde-desktop = with lib; {
enable = mkEnableOption "KDE Desktop Environment"; enable = mkEnableOption "KDE Desktop Environment";
startOnBoot = mkOption {
type = types.bool;
default = true;
description = ''
Whether the display manager (SDDM) starts automatically at boot.
When false, the system boots to a text console and KDE can be
launched on demand with the `desktop` command.
'';
};
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable (lib.mkMerge [
services = { {
displayManager.sddm.enable = true; services = {
displayManager.sddm.wayland.enable = true; displayManager.sddm.enable = true;
desktopManager.plasma6.enable = true; displayManager.sddm.wayland.enable = true;
}; desktopManager.plasma6.enable = true;
users.users.finn.packages = with pkgs; [ };
# Programms can be added here... users.users.finn.packages = with pkgs; [
numix-icon-theme # Programms can be added here...
]; numix-icon-theme
}; ];
}
(lib.mkIf (!cfg.startOnBoot) {
# Boot to a text console; SDDM stays installed but is not pulled in
# by any boot target. Launch KDE on demand with `desktop`.
systemd.services.display-manager.wantedBy = lib.mkForce [ ];
systemd.defaultUnit = lib.mkForce "multi-user.target";
environment.systemPackages = [
(pkgs.writeShellScriptBin "desktop" "exec sudo systemctl start display-manager.service")
];
})
]);
} }