2023-09-06 19:29:51 +02:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
# https://github.com/danieldk/nix-home/blob/master/home/cfg/desktop.nix
|
2023-09-06 19:40:13 +02:00
|
|
|
# https://github.com/Martins3/My-Linux-Config/blob/master/nixpkgs/home/app/gnome.nix
|
2023-09-06 19:29:51 +02:00
|
|
|
|
2023-09-07 16:56:55 +02:00
|
|
|
# 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
|
|
|
|
|
2024-01-08 15:12:56 +01:00
|
|
|
# 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
|
2024-02-04 15:01:56 +01:00
|
|
|
# diff --context=5 dconf-old.ini dconf-new.ini
|
2024-01-08 15:12:56 +01:00
|
|
|
# - Add to `dconf.settings` below.
|
|
|
|
|
2024-02-04 15:01:56 +01:00
|
|
|
# Restore settings:
|
|
|
|
# dconf load / < dconf-old.ini
|
|
|
|
|
2023-09-06 19:29:51 +02:00
|
|
|
programs.dconf.enable = true;
|
|
|
|
|
2024-02-04 15:01:56 +01:00
|
|
|
home-manager.users.yoda = { osConfig, config, pkgs, lib, ... }: {
|
2023-11-06 12:24:04 +01:00
|
|
|
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 = "";
|
|
|
|
};
|
|
|
|
|
2023-09-06 19:29:51 +02:00
|
|
|
dconf.settings = {
|
2023-09-16 17:37:19 +02:00
|
|
|
"org/gnome/desktop/media-handling" = {
|
|
|
|
# Settings > Removable Media > Never promt or start apps on media insertion
|
|
|
|
autorun-never = true;
|
2023-11-01 17:04:26 +01:00
|
|
|
|
|
|
|
# Don't automount external drives.
|
|
|
|
# https://unix.stackexchange.com/a/460299/315162
|
|
|
|
automount = false;
|
|
|
|
automount-open = false;
|
2023-09-16 17:37:19 +02:00
|
|
|
};
|
|
|
|
|
2023-09-16 17:22:30 +02:00
|
|
|
"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";
|
|
|
|
};
|
|
|
|
|
2024-01-29 22:45:36 +01:00
|
|
|
"org/gnome/settings-daemon/plugins/media-keys" = {
|
|
|
|
# Settings > Keyboard > Keyboard Shortcuts > Launchers > Home folder
|
|
|
|
home = ["<Super>e"];
|
|
|
|
};
|
|
|
|
|
2024-01-08 15:12:56 +01:00
|
|
|
"org/gnome/system/location" = {
|
|
|
|
# Settings > Privacy > Location Services > Allow permitted apps to access location data
|
|
|
|
enabled = true;
|
|
|
|
};
|
|
|
|
|
2023-09-16 16:06:58 +02:00
|
|
|
"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;
|
|
|
|
};
|
|
|
|
|
2024-02-04 15:01:56 +01:00
|
|
|
# Settings > Display > Night Light
|
2023-09-06 19:29:51 +02:00
|
|
|
"org/gnome/settings-daemon/plugins/color" = {
|
|
|
|
night-light-enabled = true;
|
2024-02-04 15:01:56 +01:00
|
|
|
night-light-temperature = lib.hm.gvariant.mkUint32 3700;
|
|
|
|
|
|
|
|
# Night light always on
|
2023-09-06 19:40:13 +02:00
|
|
|
night-light-schedule-automatic = false;
|
2024-02-04 15:01:56 +01:00
|
|
|
night-light-schedule-from = 2.0;
|
|
|
|
night-light-schedule-to = 2.0;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Epiphany (GNOME Web)
|
|
|
|
"org/gnome/epiphany" = {
|
|
|
|
ask-for-default = false;
|
|
|
|
|
|
|
|
homepage-url = "https://www.startpage.com/";
|
|
|
|
default-search-engine = "StartPage";
|
|
|
|
|
|
|
|
# search-engine-providers = ...;
|
|
|
|
# Could be helpful:
|
|
|
|
# https://github.com/matthewpi/nixos-config/blob/a6b7303f7a4a154d9d21a5ec25e725792214e3f2/users/matthew/desktop/gtk.nix#L154
|
|
|
|
# https://nix-community.github.io/home-manager/ -> hm.gvariant
|
|
|
|
# Value:
|
|
|
|
# [{'url': <'https://duckduckgo.com/?q=%s&t=epiphany'>, 'bang': <'!ddg'>, 'name': <'DuckDuckGo'>}, {'url': <'https://www.example.com/search?q=%s'>, 'bang': <''>, 'name': <'New search engine'>}, {'url': <'https://www.startpage.com/sp/search?query=%s'>, 'bang': <'!sp'>, 'name': <'StartPage'>}]
|
2023-09-06 19:29:51 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
"org/gnome/mutter" = {
|
|
|
|
dynamic-workspaces = true;
|
|
|
|
workspaces-only-on-primary = true;
|
|
|
|
};
|
2023-09-06 19:40:13 +02:00
|
|
|
|
|
|
|
"org/gnome/desktop/interface" = {
|
|
|
|
# Dark Style
|
|
|
|
color-scheme = "prefer-dark";
|
|
|
|
# Multitasking > General > Hot Corner
|
|
|
|
enable-hot-corners = false;
|
|
|
|
show-battery-percentage = true;
|
|
|
|
};
|
2023-09-06 19:29:51 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|