snowflake/system/de-twm.nix
2025-06-02 22:28:14 +08:00

39 lines
997 B
Nix

{ config, pkgs, lib, ... }:
let
inherit (lib) mkOption mkIf types;
cfg = config.deWm;
in
{
options.deWm = {
cinnamon.enable = mkOption {
default = true; ## at least one of them has to be enabled
type = types.bool;
};
xfce.enable = mkOption {
default = true;
type = types.bool;
};
};
config = {
services = {
xserver = {
desktopManager.cinnamon.enable = cfg.cinnamon.enable;
desktopManager.xfce.enable = cfg.xfce.enable;
};
};
environment.systemPackages = with pkgs; [
xorg.xev xorg.xinit xtitle xwinmosaic xdo xdotool xsel xclip
] ++ lib.optionals cfg.xfce.enable [
xfce.gigolo xfce.xfce4-dict xfce.xfce4-panel xfce.xfce4-pulseaudio-plugin
xfce.xfce4-whiskermenu-plugin xfce.mousepad xfce.xfwm4-themes xfce.xfce4-netload-plugin
];
environment.xfce.excludePackages = with pkgs.xfce; mkIf cfg.xfce.enable [
xfce4-appfinder xfce4-taskmanager xfce4-terminal
];
};
}