sneeuwvlok/modules/nixos/desktop/default.nix
Chris Kruining 73929e0cf9
Some checks failed
Test action / kaas (push) Failing after 0s
I'm so tired of all this crap...
2025-12-18 16:22:43 +01:00

37 lines
687 B
Nix

{
lib,
config,
namespace,
inputs,
...
}: let
inherit (lib) mkIf mkOption mkEnableOption mkMerge;
inherit (lib.types) nullOr enum;
cfg = config.${namespace}.desktop;
in {
imports = [
inputs.grub2-themes.nixosModules.default
];
options.${namespace}.desktop = {
use = mkOption {
type = nullOr (enum ["plasma" "gamescope" "gnome" "cosmic"]);
default = null;
example = "plasma";
description = "Which desktop to enable";
};
};
config = mkMerge [
{
services.displayManager = {
enable = true;
};
}
# (mkIf (cfg.use != null) {
# ${namespace}.desktop.${cfg.use}.enable = true;
# })
];
}