Add plasma option

This commit is contained in:
Joshua Yuen 2025-07-27 16:27:41 -04:00
parent 93f6f30175
commit b98d397329
Signed by: josh
GPG Key ID: 502720BC22ED411C
7 changed files with 50 additions and 7 deletions

View File

@ -13,7 +13,8 @@
];
modules.hyprland.enable = true;
modules.displayManager.displayManager = "gdm";
modules.plasma.enable = true;
modules.displayManager.displayManager = "sddm";
modules.zsh.enable = true;
modules.shell.defaultShell = "zsh";

View File

@ -6,6 +6,7 @@
./gdm.nix
./hyprland.nix
./packages.nix
./plasma.nix
./sddm.nix
./system.nix
./user.nix

14
modules/core/plasma.nix Normal file
View File

@ -0,0 +1,14 @@
{
config,
lib,
...
}:
with lib;
let
cfg = config.modules.plasma;
in
{
config = mkIf cfg.enable {
services.desktopManager.plasma6.enable = true;
};
}

View File

@ -12,6 +12,9 @@ in
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
settings = {
General.DisplayServer = "wayland";
};
};
# To prevent getting stuck at shutdown

View File

@ -7,6 +7,7 @@
with lib;
let
hyprlandCfg = osConfig.modules.hyprland;
plasmaCfg = osConfig.modules.plasma;
in
{
xdg = {
@ -15,12 +16,20 @@ in
mimeApps.enable = true;
portal = {
enable = true;
extraPortals = mkIf hyprlandCfg.enable [
pkgs.xdg-desktop-portal-hyprland
];
configPackages = mkIf hyprlandCfg.enable [
pkgs.hyprland
];
extraPortals = []
++ (if hyprlandCfg.enable
then [ pkgs.xdg-desktop-portal-hyprland ]
else [])
++ (if plasmaCfg.enable
then [ pkgs.kdePackages.xdg-desktop-portal-kde ]
else []);
configPackages = []
++ (if hyprlandCfg.enable
then [ pkgs.hyprland ]
else [])
++ (if plasmaCfg.enable
then [ pkgs.kdePackages.kde-gtk-config ]
else []);
};
};
}

View File

@ -5,6 +5,7 @@
imports = [
./displayManager.nix
./hyprland.nix
./plasma.nix
./shell.nix
./zsh.nix
];

View File

@ -0,0 +1,14 @@
{
config,
lib,
...
}:
with lib;
let
cfg = config.modules.plasma;
in
{
options.modules.plasma = {
enable = mkEnableOption "Enable Plasma";
};
}