2024-09-08 19:22:14 -05:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
2024-09-12 20:50:53 -05:00
|
|
|
with lib; let
|
2024-09-08 19:22:14 -05:00
|
|
|
cfg = config.custom.desktops.gnome;
|
2024-09-12 20:50:53 -05:00
|
|
|
in {
|
2024-09-08 19:22:14 -05:00
|
|
|
options.custom.desktops.gnome = {
|
2024-09-12 20:50:53 -05:00
|
|
|
enable = mkOption {default = false;};
|
|
|
|
gdm = mkOption {default = true;};
|
2024-12-26 19:06:11 -05:00
|
|
|
minimal = mkOption {default = false;};
|
2024-09-08 19:22:14 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2024-12-26 19:06:11 -05:00
|
|
|
# https://wiki.nixos.org/wiki/GNOME
|
2024-09-08 19:22:14 -05:00
|
|
|
# FIXME: xdg-desktop-portal-[gnome|gtk] not working through steam
|
|
|
|
services = {
|
2024-12-26 19:06:11 -05:00
|
|
|
xserver = mkIf (!cfg.minimal) {
|
2024-09-08 19:22:14 -05:00
|
|
|
enable = true;
|
|
|
|
desktopManager.gnome.enable = true;
|
|
|
|
displayManager.gdm.enable = cfg.gdm;
|
|
|
|
};
|
|
|
|
|
2024-12-26 19:06:11 -05:00
|
|
|
gnome = {
|
|
|
|
core-os-services.enable = mkIf cfg.minimal true;
|
|
|
|
gnome-browser-connector.enable = !cfg.minimal;
|
|
|
|
};
|
2024-09-08 19:22:14 -05:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|