Dconf : Split config.

This commit is contained in:
Dmitry Voronin 2024-05-12 02:40:37 +03:00
parent a2f4c737a1
commit 16d734d81e
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
24 changed files with 324 additions and 364 deletions

View file

@ -176,6 +176,7 @@
# SpecialArgs allows you to pass objects down to other NixOS modules. # SpecialArgs allows you to pass objects down to other NixOS modules.
specialArgs = let specialArgs = let
pkgs = nixpkgs.legacyPackages.${system}.pkgs; pkgs = nixpkgs.legacyPackages.${system}.pkgs;
lib = nixpkgs.lib;
config = self.nixosConfigurations.${hostname}.config; config = self.nixosConfigurations.${hostname}.config;
in { in {
const = self.const; # Constant values. const = self.const; # Constant values.
@ -184,9 +185,9 @@
key = import ./part/Key.nix {}; # Keyboard keys config. key = import ./part/Key.nix {}; # Keyboard keys config.
secret = import ./part/Secret.nix {}; # Secrets (public keys). secret = import ./part/Secret.nix {}; # Secrets (public keys).
setting = import ./part/Setting.nix {}; # My own global settings. setting = import ./part/Setting.nix {}; # My own global settings.
style = import ./part/Style.nix { config = config; }; # Style abstraction. style = import ./part/Style.nix { inherit config; }; # Style abstraction.
util = import ./part/Util.nix { pkgs = pkgs; }; # Util functions. util = import ./part/Util.nix { inherit pkgs lib; }; # Util functions.
wallpaper = import ./part/Wallpaper.nix { pkgs = pkgs; }; # Wallpaper. wallpaper = import ./part/Wallpaper.nix { inherit pkgs; }; # Wallpaper.
}; };
}; };
@ -335,6 +336,7 @@
extraSpecialArgs = let extraSpecialArgs = let
# We want arm64 packages for Android. # We want arm64 packages for Android.
pkgs = nixpkgs.legacyPackages."aarch64-linux".pkgs; pkgs = nixpkgs.legacyPackages."aarch64-linux".pkgs;
lib = nixpkgs.lib;
in { in {
const = self.const; # Constant values. const = self.const; # Constant values.
flake = self; # This Flake itself. flake = self; # This Flake itself.
@ -343,7 +345,7 @@
secret = import ./part/Secret.nix {}; # Secrets (public keys). secret = import ./part/Secret.nix {}; # Secrets (public keys).
setting = import ./part/Setting.nix {}; # My own global settings. setting = import ./part/Setting.nix {}; # My own global settings.
style = import ./part/Style.nix { config = import ./part/style/Gruvbox.nix {}; }; # Style abstraction. Stylix is not available for Android so I provide static Gruvbox style. style = import ./part/Style.nix { config = import ./part/style/Gruvbox.nix {}; }; # Style abstraction. Stylix is not available for Android so I provide static Gruvbox style.
util = import ./part/Util.nix { pkgs = pkgs; }; # Util functions. util = import ./part/Util.nix { inherit pkgs lib; }; # Util functions.
}; };
}; };
}; };

View file

@ -9,22 +9,12 @@
offMax = "95"; offMax = "95";
script = pkgs.writeShellScriptBin "powerlimit" (import ./powerlimit/Script.nix { script = pkgs.writeShellScriptBin "powerlimit" (import ./powerlimit/Script.nix {
inherit controlFileMax; inherit controlFileMax controlFileMin onMin onMax offMin offMax;
inherit controlFileMin;
inherit onMin;
inherit onMax;
inherit offMin;
inherit offMax;
}).script; }).script;
in { in {
imports = [ imports = [
(import ./powerlimit ({ (import ./powerlimit ({
inherit controlFileMax; inherit controlFileMax controlFileMin onMin onMax offMin offMax;
inherit controlFileMin;
inherit onMin;
inherit onMax;
inherit offMin;
inherit offMax;
} // args)) } // args))
]; ];

View file

@ -5,9 +5,7 @@
disable = "1"; disable = "1";
script = pkgs.writeShellScriptBin "powersave" (import ./powersave/Script.nix { script = pkgs.writeShellScriptBin "powersave" (import ./powersave/Script.nix {
inherit controlFile; inherit controlFile enable disable;
inherit enable;
inherit disable;
}).script; }).script;
in { in {
# Requirements: # Requirements:
@ -15,9 +13,7 @@ in {
# PSS (Cool and Quiet) - Enabled. # PSS (Cool and Quiet) - Enabled.
imports = [ imports = [
(import ./powersave ({ (import ./powersave ({
inherit controlFile; inherit controlFile enable disable;
inherit enable;
inherit disable;
} // args)) } // args))
]; ];

View file

@ -5,16 +5,12 @@
disable = "0"; disable = "0";
script = pkgs.writeShellScriptBin "powersave" (import ./powersave/Script.nix { script = pkgs.writeShellScriptBin "powersave" (import ./powersave/Script.nix {
inherit controlFile; inherit controlFile enable disable;
inherit enable;
inherit disable;
}).script; }).script;
in { in {
imports = [ imports = [
(import ./powersave ({ (import ./powersave ({
inherit controlFile; inherit controlFile enable disable;
inherit enable;
inherit disable;
} // args)) } // args))
]; ];

View file

@ -1,336 +1,10 @@
{ lib, key, ... }: let { util, ... } @args: let
mod = key.gnome.mod; settings = util.catSet (util.ls ./dconf) args;
in { in {
# Gnome DE and GTK apps configuration. # Gnome DE and GTK apps configuration.
programs.dconf.enable = true; programs.dconf.enable = true;
programs.dconf.profiles.user = { programs.dconf.profiles.user = {
enableUserDb = true; # Delete `~/.config/dconf/user` to reset user settings. enableUserDb = true; # Delete `~/.config/dconf/user` to reset user settings.
databases = [{ databases = [{ inherit settings; }];
settings = with lib.gvariant; {
"org/gnome/desktop/a11y" = {
always-show-universal-access-status = true;
};
# "org/gnome/desktop/background" = {
# color-shading-type = "solid";
# picture-options = "none";
# primary-color = "#000000000000";
# secondary-color = "#000000000000";
# };
"org/gnome/desktop/input-sources" = {
current = mkUint32 0;
mru-sources = [ (mkTuple [ "xkb" "us" ]) (mkTuple [ "xkb" "ru" ]) ];
per-window = false;
show-all-sources = true;
sources = [ (mkTuple [ "xkb" "us" ]) (mkTuple [ "xkb" "ru" ]) ];
xkb-options = [ "grp:caps_toggle" ];
};
"org/gnome/desktop/interface" = {
clock-show-date = true;
clock-show-weekday = true;
color-scheme = "prefer-dark";
# cursor-blink = false;
# cursor-size = "24";
# cursor-theme = "Adwaita";
# document-font-name = "SF Pro Text 11";
enable-animations = false;
enable-hot-corners = false;
# font-antialiasing = "rgba";
# font-hinting = "full";
# font-name = "SF Pro Display 10";
gtk-enable-primary-paste = false;
# gtk-theme = "Adwaita";
# icon-theme = "Adwaita";
# monospace-font-name = "Terminess Nerd Font Mono Medium 12";
show-battery-percentage = false;
# toolbar-style = "text";
# toolkit-accessibility = false;
};
"org/gnome/desktop/media-handling" = {
automount = false;
automount-open = false;
autorun-never = true;
};
"org/gnome/desktop/peripherals/mouse" = {
accel-profile = "flat";
natural-scroll = true;
speed = "0.0";
};
"org/gnome/desktop/peripherals/touchpad" = {
tap-to-click = true;
two-finger-scrolling-enabled = true;
};
"org/gnome/desktop/privacy" = {
disable-camera = false;
disable-microphone = false;
old-files-age = mkUint32 30;
recent-files-max-age = mkUint32 30;
remove-old-temp-files = true;
remove-old-trash-files = true;
report-technical-problems = true;
};
# "org/gnome/desktop/remote-desktop/rdp" = {
# enable = false;
# tls-cert = "/home/voronind/.local/share/gnome-remote-desktop/tls.crt";
# tls-key = "/home/voronind/.local/share/gnome-remote-desktop/tls.key";
# view-only = true;
# };
# "org/gnome/desktop/screensaver" = {
# color-shading-type = "solid";
# idle-activation-enabled = false;
# lock-delay = mkUint32 0;
# picture-options = "zoom";
# picture-uri = "file:///etc/wallpaper/Forest.jpg";
# primary-color = "#000000000000";
# secondary-color = "#000000000000";
# };
"org/gnome/desktop/sound" = {
allow-volume-above-100-percent = false;
event-sounds = false;
# theme-name = "freedesktop";
};
"org/gnome/desktop/wm/keybindings" = {
activate-window-menu = [ "" ];
begin-move = [ "" ];
begin-resize = [ "${mod}${key.action.resize.begin}" ];
close = [ "${mod}${key.action.close}" ];
cycle-group = [ "" ];
cycle-group-backward = [ "" ];
cycle-panels = [ "" ];
cycle-panels-backward = [ "" ];
cycle-windows = [ "" ];
cycle-windows-backward = [ "" ];
maximize = [ "" ];
maximize-horizontally = [ "" ];
minimize = [ "${mod}${key.navigation.go.down}" ];
move-to-monitor-down = [ "" ];
move-to-monitor-left = [ "" ];
move-to-monitor-right = [ "" ];
move-to-monitor-up = [ "" ];
move-to-workspace-1 = [ "" ];
move-to-workspace-2 = [ "" ];
move-to-workspace-3 = [ "" ];
move-to-workspace-4 = [ "" ];
move-to-workspace-last = [ "" ];
move-to-workspace-left = [ "<Shift>${mod}${key.navigation.move.prev}" ];
move-to-workspace-right = [ "<Shift>${mod}${key.navigation.move.next}" ];
panel-run-dialog = [ "${mod}${key.action.launch}" ];
show-desktop = [ "${mod}${key.action.hide}" ];
switch-applications = [ "${mod}${key.gnome.window.switch}" ];
switch-applications-backward = [ "<Shift>${mod}${key.gnome.window.switch}" ];
switch-group = [ "<Alt>${key.gnome.window.switch}" ];
switch-group-backward = [ "<Shift><Alt>${key.gnome.window.switch}" ];
switch-input-source = [ "" ];
switch-input-source-backward = [ "" ];
switch-panels = [ "" ];
switch-panels-backward = [ "" ];
switch-to-workspace-1 = [ "" ];
switch-to-workspace-2 = [ "" ];
switch-to-workspace-3 = [ "" ];
switch-to-workspace-4 = [ "" ];
switch-to-workspace-last = [ "" ];
switch-to-workspace-left = [ "${mod}${key.navigation.go.prev}" ];
switch-to-workspace-right = [ "${mod}${key.navigation.go.next}" ];
switch-windows = [ "" ];
switch-windows-backward = [ "" ];
toggle-fullscreen = [ "${mod}${key.gnome.window.fullscreen}" ];
toggle-maximized = [ "${mod}${key.navigation.go.up}" ];
unmaximize = [ "" ];
};
"org/gnome/desktop/wm/preferences" = {
action-middle-click-titlebar = "minimize";
action-right-click-titlebar = "menu";
focus-mode = "click"; # `click` or `sloppy`.
button-layout = "appmenu:close";
# titlebar-font = "SF Pro Display 11";
};
"org/gnome/desktop/session" = {
idle-delay = mkUint32 0;
};
"org/gnome/mutter" = {
attach-modal-dialogs = true;
center-new-windows = true;
dynamic-workspaces = true;
edge-tiling = true;
workspaces-only-on-primary = true;
};
"org/gnome/mutter/keybindings" = {
toggle-tiled-left = [ "${mod}${key.navigation.go.left}" ];
toggle-tiled-right = [ "${mod}${key.navigation.go.right}" ];
};
"org/gnome/mutter/wayland/keybindings" = {
restore-shortcuts = [ "" ];
};
"org/gnome/nautilus/icon-view" = {
default-zoom-level = "larger";
};
"org/gnome/nautilus/list-view" = {
default-zoom-level = "small";
use-tree-view = false;
};
"org/gnome/nautilus/preferences" = {
click-policy = "single";
default-folder-viewer = "list-view";
default-sort-in-reverse-order = false;
default-sort-order = "name";
migrated-gtk-settings = true;
search-filter-time-type = "last_modified";
search-view = "list-view";
show-image-thumbnails = "local-only";
};
"org/gnome/settings-daemon/plugins/color" = {
night-light-enabled = false;
night-light-schedule-automatic = false;
night-light-schedule-from = "0.0";
night-light-schedule-to = "0.0";
night-light-temperature = mkUint32 3700;
};
"org/gnome/settings-daemon/plugins/media-keys" = {
custom-keybindings = [
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/"
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/"
];
magnifier = [ "" ];
magnifier-zoom-in = [ "" ];
magnifier-zoom-out = [ "" ];
screenreader = [ "" ];
screensaver = [ "${mod}${key.action.wait}" ];
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
binding = "${mod}${key.gnome.launch.terminal}";
command = "kgx -e bash -c 'tmux new-session -A -s main; bash'";
name = "gnome-terminal";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
binding = "<Shift>${mod}${key.action.exit}";
command = "gnome-session-quit --power-off";
name = "gnome-poweroff";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2" = {
binding = "<Primary>${key.gnome.launch.terminal}";
command = "kgx -- btop";
name = "System Monitor";
};
"org/gnome/settings-daemon/plugins/power" = {
ambient-enabled = false;
idle-dim = false;
power-button-action = "nothing";
sleep-inactive-ac-timeout = "0";
sleep-inactive-ac-type = "nothing";
sleep-inactive-battery-type = "nothing";
};
"org/gnome/shell" = {
disable-extension-version-validation = true;
disable-user-extensions = false;
favorite-apps = [ "" ];
had-bluetooth-devices-setup = true;
last-selected-power-profile = "power-saver";
remember-mount-password = false;
};
"org/gnome/shell/app-switcher" = {
current-workspace-only = true;
};
"org/gnome/shell/keybindings" = {
focus-active-notification = [ "" ];
open-application-menu = [ "" ];
show-screenshot-ui = [ "${mod}${key.gnome.screenshot}" ];
switch-to-application-1 = [ "" ];
switch-to-application-2 = [ "" ];
switch-to-application-3 = [ "" ];
switch-to-application-4 = [ "" ];
switch-to-application-5 = [ "" ];
switch-to-application-6 = [ "" ];
switch-to-application-7 = [ "" ];
switch-to-application-8 = [ "" ];
switch-to-application-9 = [ "" ];
toggle-application-view = [ "" ];
toggle-message-tray = [ "" ];
toggle-overview = [ "" ];
toggle-quick-settings = [ "" ];
};
"org/gnome/shell/overrides" = {
edge-tiling = false;
};
"org/gnome/software" = {
download-updates = false;
download-updates-notify = false;
first-run = false;
show-nonfree-prompt = false;
};
"org/gnome/system/location" = {
enabled = false;
};
"org/gtk/gtk4/settings/file-chooser" = {
date-format = "regular";
location-mode = "path-bar";
show-hidden = false;
show-size-column = true;
show-type-column = true;
sidebar-width = "166";
sort-column = "modified";
sort-directories-first = true;
sort-order = "descending";
type-format = "category";
view-type = "list";
};
"org/gtk/settings/file-chooser" = {
date-format = "regular";
location-mode = "path-bar";
show-hidden = false;
show-size-column = true;
show-type-column = true;
sort-column = "modified";
sort-directories-first = true;
sort-order = "descending";
type-format = "category";
};
"system/locale" = {
region = "ru_RU.UTF-8";
};
"system/proxy" = {
mode = "none";
};
"org/virt-manager/virt-manager/connections" = {
autoconnect = ["qemu:///system"];
uris = ["qemu:///system"];
};
};
}];
}; };
} }

View file

@ -1,9 +1,9 @@
{ ... }: { { setting, ... }: {
services.xserver.enable = true; services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true; services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true; services.xserver.desktopManager.gnome.enable = true;
services.xserver.xkb = { services.xserver.xkb = {
layout = "us,ru"; layout = setting.keyboard.layouts;
options = "grp:toggle"; options = setting.keyboard.options;
}; };
} }

View file

@ -0,0 +1,5 @@
{ ... }: {
"org/gnome/desktop/a11y" = {
always-show-universal-access-status = true;
};
}

View file

@ -0,0 +1,27 @@
{ ... }: {
"org/gtk/gtk4/settings/file-chooser" = {
date-format = "regular";
location-mode = "path-bar";
show-hidden = false;
show-size-column = true;
show-type-column = true;
sidebar-width = "166";
sort-column = "modified";
sort-directories-first = true;
sort-order = "descending";
type-format = "category";
view-type = "list";
};
"org/gtk/settings/file-chooser" = {
date-format = "regular";
location-mode = "path-bar";
show-hidden = false;
show-size-column = true;
show-type-column = true;
sort-column = "modified";
sort-directories-first = true;
sort-order = "descending";
type-format = "category";
};
}

View file

@ -0,0 +1,21 @@
{ lib, setting, ... }: {
"org/gnome/desktop/input-sources" = with lib.gvariant; {
current = mkUint32 0;
mru-sources = [ (mkTuple [ "xkb" "us" ]) (mkTuple [ "xkb" "ru" ]) ];
per-window = false;
show-all-sources = true;
sources = [ (mkTuple [ "xkb" "us" ]) (mkTuple [ "xkb" "ru" ]) ];
xkb-options = [ setting.keyboard.options ];
};
"org/gnome/desktop/peripherals/mouse" = {
accel-profile = "flat";
natural-scroll = true;
speed = "0.0";
};
"org/gnome/desktop/peripherals/touchpad" = {
tap-to-click = true;
two-finger-scrolling-enabled = true;
};
}

View file

@ -0,0 +1,11 @@
{ ... }: {
"org/gnome/desktop/interface" = {
clock-show-date = true;
clock-show-weekday = true;
color-scheme = "prefer-dark";
enable-animations = false;
enable-hot-corners = false;
gtk-enable-primary-paste = false;
show-battery-percentage = false;
};
}

View file

@ -0,0 +1,111 @@
{ key, ... }: let
mod = key.gnome.mod;
in {
"org/gnome/desktop/wm/keybindings" = {
activate-window-menu = [ "" ];
begin-move = [ "" ];
begin-resize = [ "${mod}${key.action.resize.begin}" ];
close = [ "${mod}${key.action.close}" ];
cycle-group = [ "" ];
cycle-group-backward = [ "" ];
cycle-panels = [ "" ];
cycle-panels-backward = [ "" ];
cycle-windows = [ "" ];
cycle-windows-backward = [ "" ];
maximize = [ "" ];
maximize-horizontally = [ "" ];
minimize = [ "${mod}${key.navigation.go.down}" ];
move-to-monitor-down = [ "" ];
move-to-monitor-left = [ "" ];
move-to-monitor-right = [ "" ];
move-to-monitor-up = [ "" ];
move-to-workspace-1 = [ "" ];
move-to-workspace-2 = [ "" ];
move-to-workspace-3 = [ "" ];
move-to-workspace-4 = [ "" ];
move-to-workspace-last = [ "" ];
move-to-workspace-left = [ "<Shift>${mod}${key.navigation.move.prev}" ];
move-to-workspace-right = [ "<Shift>${mod}${key.navigation.move.next}" ];
panel-run-dialog = [ "${mod}${key.action.launch}" ];
show-desktop = [ "${mod}${key.action.hide}" ];
switch-applications = [ "${mod}${key.gnome.window.switch}" ];
switch-applications-backward = [ "<Shift>${mod}${key.gnome.window.switch}" ];
switch-group = [ "<Alt>${key.gnome.window.switch}" ];
switch-group-backward = [ "<Shift><Alt>${key.gnome.window.switch}" ];
switch-input-source = [ "" ];
switch-input-source-backward = [ "" ];
switch-panels = [ "" ];
switch-panels-backward = [ "" ];
switch-to-workspace-1 = [ "" ];
switch-to-workspace-2 = [ "" ];
switch-to-workspace-3 = [ "" ];
switch-to-workspace-4 = [ "" ];
switch-to-workspace-last = [ "" ];
switch-to-workspace-left = [ "${mod}${key.navigation.go.prev}" ];
switch-to-workspace-right = [ "${mod}${key.navigation.go.next}" ];
switch-windows = [ "" ];
switch-windows-backward = [ "" ];
toggle-fullscreen = [ "${mod}${key.gnome.window.fullscreen}" ];
toggle-maximized = [ "${mod}${key.navigation.go.up}" ];
unmaximize = [ "" ];
};
"org/gnome/mutter/keybindings" = {
toggle-tiled-left = [ "${mod}${key.navigation.go.left}" ];
toggle-tiled-right = [ "${mod}${key.navigation.go.right}" ];
};
"org/gnome/mutter/wayland/keybindings" = {
restore-shortcuts = [ "" ];
};
"org/gnome/settings-daemon/plugins/media-keys" = {
custom-keybindings = [
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/"
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/"
];
magnifier = [ "" ];
magnifier-zoom-in = [ "" ];
magnifier-zoom-out = [ "" ];
screenreader = [ "" ];
screensaver = [ "${mod}${key.action.wait}" ];
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
binding = "${mod}${key.gnome.launch.terminal}";
command = "kgx -e bash -c 'tmux new-session -A -s main; bash'";
name = "gnome-terminal";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
binding = "<Shift>${mod}${key.action.exit}";
command = "gnome-session-quit --power-off";
name = "gnome-poweroff";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2" = {
binding = "<Primary>${key.gnome.launch.terminal}";
command = "kgx -- btop";
name = "System Monitor";
};
"org/gnome/shell/keybindings" = {
focus-active-notification = [ "" ];
open-application-menu = [ "" ];
show-screenshot-ui = [ "${mod}${key.gnome.screenshot}" ];
switch-to-application-1 = [ "" ];
switch-to-application-2 = [ "" ];
switch-to-application-3 = [ "" ];
switch-to-application-4 = [ "" ];
switch-to-application-5 = [ "" ];
switch-to-application-6 = [ "" ];
switch-to-application-7 = [ "" ];
switch-to-application-8 = [ "" ];
switch-to-application-9 = [ "" ];
toggle-application-view = [ "" ];
toggle-message-tray = [ "" ];
toggle-overview = [ "" ];
toggle-quick-settings = [ "" ];
};
}

View file

@ -0,0 +1,7 @@
{ ... }: {
"org/gnome/desktop/media-handling" = {
automount = false;
automount-open = false;
autorun-never = true;
};
}

View file

@ -0,0 +1,21 @@
{ ... }: {
"org/gnome/nautilus/icon-view" = {
default-zoom-level = "larger";
};
"org/gnome/nautilus/list-view" = {
default-zoom-level = "small";
use-tree-view = false;
};
"org/gnome/nautilus/preferences" = {
click-policy = "single";
default-folder-viewer = "list-view";
default-sort-in-reverse-order = false;
default-sort-order = "name";
migrated-gtk-settings = true;
search-filter-time-type = "last_modified";
search-view = "list-view";
show-image-thumbnails = "local-only";
};
}

View file

@ -0,0 +1,10 @@
{ ... }: {
"org/gnome/settings-daemon/plugins/power" = {
ambient-enabled = false;
idle-dim = false;
power-button-action = "nothing";
sleep-inactive-ac-timeout = "0";
sleep-inactive-ac-type = "nothing";
sleep-inactive-battery-type = "nothing";
};
}

View file

@ -0,0 +1,15 @@
{ lib, ... }: {
"org/gnome/desktop/privacy" = with lib.gvariant; {
disable-camera = false;
disable-microphone = false;
old-files-age = mkUint32 30;
recent-files-max-age = mkUint32 30;
remove-old-temp-files = true;
remove-old-trash-files = true;
report-technical-problems = true;
};
"org/gnome/system/location" = {
enabled = false;
};
}

View file

@ -0,0 +1,5 @@
{ lib, ... }: {
"org/gnome/desktop/session" = with lib.gvariant; {
idle-delay = mkUint32 0;
};
}

View file

@ -0,0 +1,14 @@
{ ... }: {
"org/gnome/shell" = {
disable-extension-version-validation = true;
disable-user-extensions = false;
favorite-apps = [ "" ];
had-bluetooth-devices-setup = true;
last-selected-power-profile = "power-saver";
remember-mount-password = false;
};
"system/proxy" = {
mode = "none";
};
}

View file

@ -0,0 +1,8 @@
{ ... }: {
"org/gnome/software" = {
download-updates = false;
download-updates-notify = false;
first-run = false;
show-nonfree-prompt = false;
};
}

View file

@ -0,0 +1,7 @@
{ ... }: {
"org/gnome/desktop/sound" = {
allow-volume-above-100-percent = false;
event-sounds = false;
theme-name = "freedesktop";
};
}

View file

@ -0,0 +1,32 @@
{ lib, ... }: {
"org/gnome/desktop/wm/preferences" = {
action-middle-click-titlebar = "minimize";
action-right-click-titlebar = "menu";
focus-mode = "click"; # `click` or `sloppy`.
button-layout = "appmenu:close";
};
"org/gnome/mutter" = {
attach-modal-dialogs = true;
center-new-windows = true;
dynamic-workspaces = true;
edge-tiling = true;
workspaces-only-on-primary = true;
};
"org/gnome/settings-daemon/plugins/color" = with lib.gvariant; {
night-light-enabled = false;
night-light-schedule-automatic = false;
night-light-schedule-from = "0.0";
night-light-schedule-to = "0.0";
night-light-temperature = mkUint32 3700;
};
"org/gnome/shell/app-switcher" = {
current-workspace-only = true;
};
"org/gnome/shell/overrides" = {
edge-tiling = false;
};
}

View file

@ -6,7 +6,7 @@
install_url = url; install_url = url;
}; };
mkBookmark = name: url: { inherit name; inherit url; }; mkBookmark = name: url: { inherit name url; };
in { in {
# Disable profile switching on rebuild. # Disable profile switching on rebuild.
environment.variables = { environment.variables = {

View file

@ -33,8 +33,8 @@
} }
input type:keyboard { input type:keyboard {
xkb_layout us,ru xkb_layout ${setting.keyboard.layouts}
xkb_options grp:toggle xkb_options ${setting.keyboard.options}
} }
# Hide mouse cursor after a period of inactivity. # Hide mouse cursor after a period of inactivity.

View file

@ -56,4 +56,9 @@
brightness.step = 5; brightness.step = 5;
volume.step = 5; volume.step = 5;
music.step = 10; music.step = 10;
keyboard = {
layouts = "us,ru";
options = "grp:toggle";
};
} }

View file

@ -1,5 +1,5 @@
# Collection of common functions. # Collection of common functions.
{ pkgs, ... }: rec { { pkgs, lib, ... }: rec {
# Remove tabs indentation, # Remove tabs indentation,
trimTabs = text: let trimTabs = text: let
shouldStripTab = lines: builtins.all (line: (line == "") || (pkgs.lib.strings.hasPrefix " " line)) lines; shouldStripTab = lines: builtins.all (line: (line == "") || (pkgs.lib.strings.hasPrefix " " line)) lines;
@ -16,6 +16,9 @@
acc + trimTabs ((import mod args).text) acc + trimTabs ((import mod args).text)
) "" files; ) "" files;
# Concat all files as a set.
catSet = files: args: lib.mkMerge (map (file: import file args) files);
# Systemd service that does not restart with system switch. # Systemd service that does not restart with system switch.
mkStaticSystemdService = params: params // { mkStaticSystemdService = params: params // {
restartIfChanged = false; restartIfChanged = false;