[desktop] Add a waylandOnly option

This commit is contained in:
2024-12-14 15:38:46 -08:00
parent 8134d7cb33
commit 7da089daa3
2 changed files with 11 additions and 7 deletions

View File

@@ -15,13 +15,11 @@ let
];
x11BasePackages = with pkgs; [
customPackages.modrinthNvidia
];
x11OnlyPackages = with pkgs; [
emacs
customPackages.modrinthNvidia
];
waylandBasePackages = with pkgs; [
@@ -42,6 +40,10 @@ in
type = types.bool;
default = false;
};
waylandOnly = mkOption {
type = types.bool;
default = false;
};
};
config = mkIf cfg.enable
@@ -131,11 +133,10 @@ in
environment.systemPackages = with pkgs; mkMerge [
basePackages
x11BasePackages
(mkIf (!cfg.waylandOnly) x11BasePackages)
(mkIf cfg.x11Only x11OnlyPackages)
# TODO: Do we need a "wayland only" mode?
(mkIf (!cfg.x11Only) waylandBasePackages)
(mkIf (!cfg.x11Only) waylandOnlyPackages)
(mkIf (cfg.waylandOnly) waylandOnlyPackages)
];
};