nix-git/modules/gnome-config.nix

97 lines
3.2 KiB
Nix

{ config, pkgs, ... }:
{
# https://github.com/danieldk/nix-home/blob/master/home/cfg/desktop.nix
# https://github.com/Martins3/My-Linux-Config/blob/master/nixpkgs/home/app/gnome.nix
# gsettings (or dconf-editor) schemas are spread throughout the nix store.
# One can use a script to add them to $XDG_DATA_DIRS and then execute a command.
# Here is an example script:
# https://github.com/NixOS/nixpkgs/issues/33277#issuecomment-354689755
# To add new config changes to NixOS:
# - Dump current settings
# dconf dump / > dconf-old.ini
# - Change a setting, e.g. with dconf-editir
# - Dump new settings
# dconf dump / > dconf-new.ini
# - Display changes
# diff dconf-old.ini dconf-new.ini
# - Add to `dconf.settings` below.
programs.dconf.enable = true;
home-manager.users.yoda = { osConfig, config, pkgs, ... }: {
home.file = {
# Templates to create new Files with Nautilus.
# It is also possible to group them by category
# and to add zip files as templates for new folders:
# https://www.reddit.com/r/gnome/comments/11tz0aw/comment/jclkzld/
"Templates/new".text = "";
"Templates/new.md".text = "";
"Templates/new.txt".text = "";
};
dconf.settings = {
"org/gnome/desktop/media-handling" = {
# Settings > Removable Media > Never promt or start apps on media insertion
autorun-never = true;
# Don't automount external drives.
# https://unix.stackexchange.com/a/460299/315162
automount = false;
automount-open = false;
};
"org/gnome/settings-daemon/plugins/power" = {
# Settings > Automatic Suspend > Plugged In
sleep-inactive-ac-type = "nothing";
# Settings > Automatic Suspend > On Battery Power
sleep-inactive-battery-type = "suspend";
};
"org/gnome/settings-daemon/plugins/media-keys" = {
# Settings > Keyboard > Keyboard Shortcuts > Launchers > Home folder
home = ["<Super>e"];
};
"org/gnome/system/location" = {
# Settings > Privacy > Location Services > Allow permitted apps to access location data
enabled = true;
};
"org/gnome/desktop/privacy" = {
# Settings > File History > Enabled
remember-recent-files = true;
# Settings > File History > File History Duration
recent-files-max-age = 30;
# Settings > Trash and Temporary Files > Automatically Delete Trash Content
remove-old-trash-files = true;
# Settings > Trash and Temporary Files > Automatically Delete Temporary Files
remove-old-temp-files = true;
# Settings > Trash and Temporary Files > Automatically Delete Period
old-files-age = 30;
};
"org/gnome/settings-daemon/plugins/color" = {
night-light-enabled = true;
night-light-schedule-automatic = false;
#night-light-temperature = "uint32 3700";
};
"org/gnome/mutter" = {
dynamic-workspaces = true;
workspaces-only-on-primary = true;
};
"org/gnome/desktop/interface" = {
# Dark Style
color-scheme = "prefer-dark";
# Multitasking > General > Hot Corner
enable-hot-corners = false;
show-battery-percentage = true;
};
};
};
}