snowflake/system/de-twm.nix
2025-06-02 21:47:20 +08:00

37 lines
835 B
Nix

{ config, pkgs, lib, ... }:
let
inherit (lib) mkOption mkIf types;
cfg = config.deWm;
in
{
options.deWm = {
cinnamon.enable = mkOption {
default = false;
type = types.bool;
};
xfce.enable = mkOption {
default = false;
type = types.bool;
};
};
config = {
services = {
xserver = {
desktopManager.cinnamon.enable = cfg.cinnamon.enable;
desktopManager.xfce.enable = cfg.xfce.enable;
};
};
environment.xfce.excludePackages = with pkgs.xfce; mkIf cfg.xfce.enable [
xfce4-appfinder xfce4-taskmanager xfce4-terminal
];
environment.systemPackages = with pkgs.xfce; mkIf cfg.xfce.enable [
gigolo xfce4-dict xfce4-panel xfce4-pulseaudio-plugin
xfce4-whiskermenu-plugin mousepad xfwm4-themes xfce4-netload-plugin
];
};
}