nixos-config/modules/gnome.nix

70 lines
3.2 KiB
Nix
Raw Normal View History

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-03-30 01:16:19 +00:00
};
2021-06-28 22:19:23 +00:00
services.colord.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
gnomeExtensions.dash-to-dock
2021-04-27 16:17:34 +00:00
gnomeExtensions.dash-to-panel
2021-03-30 01:16:19 +00:00
numix-icon-theme
2020-09-24 05:45:48 +00:00
qemu_kvm
(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
'')
(writeShellScriptBin "gnome-my-settings" ''
gsettings set org.gnome.desktop.interface enable-hot-corners false
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.peripherals.mouse middle-click-emulation true
2021-04-21 23:08:59 +00:00
gsettings set org.gnome.desktop.peripherals.mouse speed 0.25
gsettings set org.gnome.desktop.privacy recent-files-max-age 30
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.privacy report-technical-problems false
gsettings set org.gnome.desktop.privacy send-software-usage-stats false
gsettings set org.gnome.desktop.screensaver lock-enabled false
gsettings set org.gnome.desktop.search-providers disabled "['org.gnome.Epiphany.desktop']"
gsettings set org.gnome.desktop.wm.keybindings maximize-vertically "['<Super>w']"
2021-05-28 18:35:40 +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'
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing'
echo 'window.ssd headerbar.titlebar { padding-top: 1px; padding-bottom: 1px; }' > ~/.config/gtk-3.0/gtk.css
gsettings set org.gnome.desktop.interface icon-theme 'Numix'; sleep 1
gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'
'')
2021-03-30 01:16:19 +00:00
];
2020-09-24 05:45:48 +00:00
};
2020-09-18 13:54:09 +00:00
}