2021-03-30 01:16:19 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.sconfig.gnome;
|
|
|
|
in
|
2020-09-18 13:54:09 +00:00
|
|
|
{
|
2021-03-30 01:16:19 +00:00
|
|
|
options.sconfig.gnome = lib.mkEnableOption "Enable Gnome Desktop";
|
|
|
|
|
|
|
|
config = lib.mkIf cfg {
|
|
|
|
|
|
|
|
services.xserver = {
|
|
|
|
enable = true;
|
|
|
|
libinput.enable = true;
|
|
|
|
displayManager.gdm.enable = true;
|
|
|
|
displayManager.gdm.autoSuspend = false;
|
2021-06-01 14:09:39 +00:00
|
|
|
desktopManager.gnome.enable = true;
|
2021-08-16 13:40:02 +00:00
|
|
|
displayManager.defaultSession = "gnome-xorg";
|
2021-03-30 01:16:19 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 22:19:23 +00:00
|
|
|
services.colord.enable = false;
|
|
|
|
|
2022-07-21 13:49:34 +00:00
|
|
|
systemd.services.packagekit.enable = false;
|
|
|
|
|
2021-03-30 01:16:19 +00:00
|
|
|
environment.systemPackages = with pkgs; [
|
2020-09-24 05:45:48 +00:00
|
|
|
gnome3.gnome-tweaks
|
2021-03-30 01:16:19 +00:00
|
|
|
gnomeExtensions.appindicator
|
2021-06-09 16:01:21 +00:00
|
|
|
gnomeExtensions.dash-to-dock
|
2021-04-27 16:17:34 +00:00
|
|
|
gnomeExtensions.dash-to-panel
|
2022-10-29 06:11:56 +00:00
|
|
|
gnomeExtensions.ddterm
|
2021-03-28 05:05:20 +00:00
|
|
|
|
2021-09-08 03:13:03 +00:00
|
|
|
(runCommand "x-terminal-emulator" { } ''
|
|
|
|
mkdir -p $out/bin
|
2022-11-16 18:20:46 +00:00
|
|
|
ln -s /run/current-system/sw/bin/kgx $out/bin/x-terminal-emulator
|
2021-09-08 03:13:03 +00:00
|
|
|
'')
|
|
|
|
|
2020-10-26 15:47:45 +00:00
|
|
|
(writeShellScriptBin "red" ''
|
2020-09-24 05:45:48 +00:00
|
|
|
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
|
|
|
|
'')
|
2021-10-27 15:36:44 +00:00
|
|
|
];
|
2021-03-28 05:05:20 +00:00
|
|
|
|
2021-10-27 15:36:44 +00:00
|
|
|
sconfig.user-settings = ''
|
2022-05-27 17:37:40 +00:00
|
|
|
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
|
2021-10-27 15:36:44 +00:00
|
|
|
gsettings set org.gnome.desktop.interface enable-hot-corners false
|
2021-11-09 18:10:11 +00:00
|
|
|
gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'
|
2022-11-02 14:11:51 +00:00
|
|
|
gsettings set org.gnome.desktop.interface monospace-font-name 'Monospace 12'
|
2021-10-27 15:36:44 +00:00
|
|
|
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 "['<Super>w']"
|
|
|
|
gsettings set org.gnome.desktop.wm.keybindings switch-applications "['<Super>Tab']"
|
|
|
|
gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "['<Shift><Super>Tab']"
|
|
|
|
gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<Alt>Tab']"
|
|
|
|
gsettings set org.gnome.desktop.wm.keybindings switch-windows-backward "['<Shift><Alt>Tab']"
|
|
|
|
gsettings set org.gnome.desktop.wm.keybindings toggle-fullscreen "['<Super>f']"
|
|
|
|
gsettings set org.gnome.desktop.wm.preferences resize-with-right-button true
|
|
|
|
gsettings set org.gnome.settings-daemon.plugins.media-keys logout '[]'
|
2022-08-29 04:31:34 +00:00
|
|
|
gsettings set org.gnome.settings-daemon.plugins.media-keys www "['<Super>b']"
|
|
|
|
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ binding '<Super>Return'
|
|
|
|
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ command 'x-terminal-emulator'
|
|
|
|
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ name 'Terminal'
|
2021-10-27 15:36:44 +00:00
|
|
|
gsettings set org.gnome.settings-daemon.plugins.power power-button-action 'interactive'
|
|
|
|
'';
|
2021-03-28 05:05:20 +00:00
|
|
|
|
2022-11-02 14:11:51 +00:00
|
|
|
# Moving from Terminal to Console removes "Open in Remote Terminal" feature from nautilus
|
2022-05-27 22:42:26 +00:00
|
|
|
programs.gnome-terminal.enable = true;
|
|
|
|
|
2020-09-24 05:45:48 +00:00
|
|
|
};
|
2020-09-18 13:54:09 +00:00
|
|
|
}
|