From 58794095e38e1918ec4fcfad76eb1a3ad191fd40 Mon Sep 17 00:00:00 2001 From: Emi Simpson Date: Tue, 20 Dec 2022 14:44:49 -0500 Subject: [PATCH] Move gnome settings to dconf --- configs/dconf.nix | 52 +++++++++++++++++++++++++++++++++++++-- configs/home.nogui.nix | 4 +-- nixos.nix | 55 +----------------------------------------- 3 files changed, 53 insertions(+), 58 deletions(-) diff --git a/configs/dconf.nix b/configs/dconf.nix index 41f4e13..a386f7d 100644 --- a/configs/dconf.nix +++ b/configs/dconf.nix @@ -1,4 +1,4 @@ -{ +mkTuple: { "org/gnome/shell/extensions/pop-shell" = { tile-move-down-global=["j"]; tile-move-up-global=["k"]; @@ -40,4 +40,52 @@ "org/gnome/desktop/interface" = { show-battery-percentage=true; }; -} + + "org/gnome/shell" = { + favorite-apps=["org.gnome.Nautilus.desktop"]; + }; + "org/gnome/desktop/input-sources" = { + show-all-sources=true; + sources=[ + (mkTuple ["xkb" "us+3l"]) + (mkTuple ["xkb" "us"]) + ]; + }; + "org/gnome/desktop/wm/preferences" = { + num-workspaces=5; + }; + "org/gnome/desktop/wm/keybindings" = { + minimize=["comma"]; + switch-to-workspace-left=[]; + switch-to-workspace-right=[]; + maximize=[]; + unmaximize=[]; + move-to-monitor-up=[]; + move-to-monitor-down=[]; + move-to-monitor-left=[]; + move-to-monitor-right=[]; + switch-to-workspace-down=[]; + switch-to-workspace-up=[]; + toggle-fullscreen=["m"]; + close=["q"]; + switch-to-workspace-1=["1"]; + switch-to-workspace-2=["2"]; + switch-to-workspace-3=["3"]; + switch-to-workspace-4=["4"]; + switch-to-workspace-5=["5"]; + move-to-workspace-1=["1"]; + move-to-workspace-2=["2"]; + move-to-workspace-3=["3"]; + move-to-workspace-4=["4"]; + move-to-workspace-5=["5"]; + }; + "org/gnome/shell/keybindings" = { + open-application-menu=[]; + toggle-message-tray=[]; + toggle-overview=[]; + }; + "org/gnome/mutter/keybindings" = { + toggle-tiled-left=[]; + toggle-tiled-right=[]; + }; +} \ No newline at end of file diff --git a/configs/home.nogui.nix b/configs/home.nogui.nix index 5dabb86..a688607 100644 --- a/configs/home.nogui.nix +++ b/configs/home.nogui.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{pkgs, lib, ...}: { home.sessionVariables = { NNN_FIFO = "/tmp/nnn.fifo"; LANG = "en_US.UTF-8"; @@ -122,7 +122,7 @@ maxCacheTtl = 180; # Seconds pinentryFlavor = "gnome3"; }; - dconf.settings = import ./dconf.nix; + dconf.settings = import ./dconf.nix lib.hm.gvariant.mkTuple; home.stateVersion = "22.11"; targets.genericLinux.enable = true; } \ No newline at end of file diff --git a/nixos.nix b/nixos.nix index d0b9b36..4cea0c3 100644 --- a/nixos.nix +++ b/nixos.nix @@ -63,60 +63,7 @@ let systemInformation = import ./system/system-information.nix; in # Enable the GNOME Desktop Environment. services.xserver.displayManager.gdm.enable = true; - services.xserver.desktopManager.gnome = { - enable = true; - extraGSettingsOverrides = '' - # Favorite apps in gnome-shell - # [org.gnome.shell] - # favorite-apps=['org.gnome.Photos.desktop', 'org.gnome.Nautilus.desktop'] - - [org.gnome.desktop.input-sources] - show-all-sources=true - sources=[('xkb', 'us'), ('xkb', 'us+3l')] - - [org.gnome.desktop.wm.preferences] - num-workspaces=5 - - [org.gnome.desktop.wm.keybindings] - # Pop shell bindings - minimize=['comma'] - switch-to-workspace-left=@as [] - switch-to-workspace-right=@as [] - maximize=@as [] - unmaximize=@as [] - move-to-monitor-up=@as [] - move-to-monitor-down=@as [] - move-to-monitor-left=@as [] - move-to-monitor-right=@as [] - switch-to-workspace-down=@as [] - switch-to-workspace-up=@as [] - toggle-fullscreen=['m'] - close=['q'] - switch-to-workspace-1=@as ['1'] - switch-to-workspace-2=@as ['2'] - switch-to-workspace-3=@as ['3'] - switch-to-workspace-4=@as ['4'] - switch-to-workspace-5=@as ['5'] - move-to-workspace-1=@as ['1'] - move-to-workspace-2=@as ['2'] - move-to-workspace-3=@as ['3'] - move-to-workspace-4=@as ['4'] - move-to-workspace-5=@as ['5'] - - [org.gnome.shell.keybindings] - open-application-menu=@as [] - toggle-message-tray=@as [] - toggle-overview=@as [] - - [org.gnome.mutter.keybindings] - toggle-tiled-left=@as [] - toggle-tiled-right=@as [] - ''; - extraGSettingsOverridePackages = [ - pkgs.gsettings-desktop-schemas # for org.gnome.desktop - pkgs.gnome.gnome-shell # for org.gnome.shell - ]; - }; + services.xserver.desktopManager.gnome.enable = true; # Configure keymap in X11 services.xserver = {