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
# diff dconf-old.ini dconf-new.ini
# - Add to `dconf.settings` below.
2023-09-06 19:29:51 +02:00
programs . dconf . enable = true ;
home-manager . users . yoda = { osConfig , config , pkgs , . . . }: {
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/
" T e m p l a t e s / n e w " . text = " " ;
" T e m p l a t e s / n e w . m d " . text = " " ;
" T e m p l a t e s / n e w . t x t " . text = " " ;
} ;
2023-10-05 12:42:05 +02:00
programs . gnome-terminal . enable = true ;
programs . gnome-terminal . profile . " 7 4 b 9 0 a 3 1 - 5 1 2 3 - 4 a 6 4 - 9 1 a 3 - 3 c b 3 1 e b 5 c d b 6 " = {
default = true ;
visibleName = " Y o d a ' s T e r m i n a l " ;
font = " D e j a V u S a n s M o n o 1 1 " ;
audibleBell = false ;
# Theme: https://github.com/chriskempson/base16-default-schemes/blob/master/default-light.yaml
# Where to place theme values: https://github.com/knopki/devops-at-home/blob/307921320d6147347e830d2c709f142b809d55b4/home/modules/theme/theme-gnome-terminal.nix#L16-L41
colors = {
backgroundColor = " # f 8 f 8 f 8 " ;
foregroundColor = " # 3 8 3 8 3 8 " ;
cursor = {
background = " # 3 8 3 8 3 8 " ;
foreground = " # f 8 f 8 f 8 " ;
} ;
palette = [
" # f 8 f 8 f 8 "
" # a b 4 6 4 2 "
" # a 1 b 5 6 c "
" # f 7 c a 8 8 "
" # 7 c a f c 2 "
" # b a 8 b a f "
" # 8 6 c 1 b 9 "
" # 3 8 3 8 3 8 "
" # b 8 b 8 b 8 "
" # d c 9 6 5 6 "
" # e 8 e 8 e 8 "
" # d 8 d 8 d 8 "
" # 5 8 5 8 5 8 "
" # 2 8 2 8 2 8 "
" # a 1 6 9 4 6 "
" # 1 8 1 8 1 8 "
] ;
} ;
} ;
2023-09-06 19:29:51 +02:00
dconf . settings = {
2023-09-16 17:37:19 +02:00
" o r g / g n o m e / d e s k t o p / m e d i a - h a n d l i n g " = {
# 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
" o r g / g n o m e / s e t t i n g s - d a e m o n / p l u g i n s / p o w e r " = {
# Settings > Automatic Suspend > Plugged In
sleep-inactive-ac-type = " n o t h i n g " ;
# Settings > Automatic Suspend > On Battery Power
sleep-inactive-battery-type = " s u s p e n d " ;
} ;
2024-01-08 15:12:56 +01:00
" o r g / g n o m e / s y s t e m / l o c a t i o n " = {
# Settings > Privacy > Location Services > Allow permitted apps to access location data
enabled = true ;
} ;
2023-09-16 16:06:58 +02:00
" o r g / g n o m e / d e s k t o p / p r i v a c y " = {
# 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 ;
} ;
2023-09-06 19:29:51 +02:00
" o r g / g n o m e / s e t t i n g s - d a e m o n / p l u g i n s / c o l o r " = {
night-light-enabled = true ;
2023-09-06 19:40:13 +02:00
night-light-schedule-automatic = false ;
2023-09-06 19:29:51 +02:00
#night-light-temperature = "uint32 3700";
} ;
" o r g / g n o m e / m u t t e r " = {
dynamic-workspaces = true ;
workspaces-only-on-primary = true ;
} ;
2023-09-06 19:40:13 +02:00
" o r g / g n o m e / d e s k t o p / i n t e r f a c e " = {
# Dark Style
color-scheme = " p r e f e r - d a r k " ;
# Multitasking > General > Hot Corner
enable-hot-corners = false ;
show-battery-percentage = true ;
} ;
2023-09-06 19:29:51 +02:00
} ;
} ;
}