{ config, pkgs, lib, ... }: let cfg = config.sconfig.gnome; in { options.sconfig.gnome = lib.mkEnableOption "Enable Gnome Desktop"; config = lib.mkIf cfg { services.libinput.enable = true; services.xserver = { enable = true; displayManager.gdm.enable = true; displayManager.gdm.autoSuspend = false; desktopManager.gnome.enable = true; }; services.colord.enable = false; systemd.services.packagekit.enable = false; environment.systemPackages = with pkgs; [ gnome-tweaks # https://github.com/ubuntu/gnome-shell-extension-appindicator/issues/441 # gnomeExtensions.appindicator (writeShellScriptBin "x-terminal-emulator" '' exec kitty "$@" '') (writeShellScriptBin "red" '' x="$(gsettings get org.gnome.settings-daemon.plugins.color night-light-enabled)" [ "$x" = "true" ] && x=false || x=true echo "Nightlight: $x" gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled $x '') ]; environment.etc."bck-settings.sh".text = '' gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' gsettings set org.gnome.desktop.interface enable-hot-corners false gsettings set org.gnome.desktop.interface monospace-font-name 'Monospace 12' gsettings set org.gnome.desktop.interface show-battery-percentage true gsettings set org.gnome.desktop.media-handling automount false gsettings set org.gnome.desktop.media-handling autorun-never true gsettings set org.gnome.desktop.notifications show-in-lock-screen false gsettings set org.gnome.desktop.privacy remove-old-temp-files true gsettings set org.gnome.desktop.privacy remove-old-trash-files true gsettings set org.gnome.desktop.search-providers disabled "['org.gnome.Epiphany.desktop']" gsettings set org.gnome.desktop.wm.keybindings maximize-vertically "['w']" gsettings set org.gnome.desktop.wm.keybindings maximize-horizontally "['e']" gsettings set org.gnome.desktop.wm.keybindings switch-applications "['Tab']" gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "['Tab']" gsettings set org.gnome.desktop.wm.keybindings switch-windows "['Tab']" gsettings set org.gnome.desktop.wm.keybindings switch-windows-backward "['Tab']" gsettings set org.gnome.desktop.wm.keybindings toggle-fullscreen "['f']" gsettings set org.gnome.desktop.wm.preferences resize-with-right-button true gsettings set org.gnome.settings-daemon.plugins.media-keys logout '[]' gsettings set org.gnome.settings-daemon.plugins.power power-button-action 'interactive' ''; }; }