nixos-config/modules/gnome.nix

70 lines
2.7 KiB
Nix
Raw Normal View History

2024-11-08 03:59:57 +00:00
{
config,
pkgs,
lib,
...
}:
2021-03-30 01:16:19 +00:00
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 {
2024-05-27 21:10:14 +00:00
services.libinput.enable = true;
2021-03-30 01:16:19 +00:00
services.xserver = {
enable = true;
displayManager.gdm.enable = true;
displayManager.gdm.autoSuspend = false;
2021-06-01 14:09:39 +00:00
desktopManager.gnome.enable = true;
2021-03-30 01:16:19 +00:00
};
2021-06-28 22:19:23 +00:00
services.colord.enable = false;
systemd.services.packagekit.enable = false;
2021-03-30 01:16:19 +00:00
environment.systemPackages = with pkgs; [
2024-10-24 03:01:34 +00:00
gnome-tweaks
# https://github.com/ubuntu/gnome-shell-extension-appindicator/issues/441
# gnomeExtensions.appindicator
2022-12-22 21:54:06 +00:00
(writeShellScriptBin "x-terminal-emulator" ''
2023-09-22 03:03:58 +00:00
exec kitty "$@"
2021-09-08 03:13:03 +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
];
2024-09-25 23:27:40 +00:00
environment.etc."bck-settings.sh".text = ''
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
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']"
2024-12-08 18:14:35 +00:00
gsettings set org.gnome.desktop.wm.keybindings maximize-horizontally "['<Super>e']"
2021-10-27 15:36:44 +00:00
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 '[]'
gsettings set org.gnome.settings-daemon.plugins.power power-button-action 'interactive'
'';
2020-09-24 05:45:48 +00:00
};
2020-09-18 13:54:09 +00:00
}