mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-11-09 18:47:02 +00:00
move user settings to module
This commit is contained in:
parent
43daf5af38
commit
a5ebc87810
3 changed files with 50 additions and 35 deletions
|
@ -37,37 +37,36 @@ in
|
||||||
echo "Nightlight: $x"
|
echo "Nightlight: $x"
|
||||||
gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled $x
|
gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled $x
|
||||||
'')
|
'')
|
||||||
|
|
||||||
(writeShellScriptBin "gnome-my-settings" ''
|
|
||||||
gsettings set org.gnome.desktop.interface enable-hot-corners false
|
|
||||||
gsettings set org.gnome.desktop.interface show-battery-percentage true
|
|
||||||
gsettings set org.gnome.desktop.media-handling automount false
|
|
||||||
gsettings set org.gnome.desktop.media-handling autorun-never true
|
|
||||||
gsettings set org.gnome.desktop.notifications show-in-lock-screen false
|
|
||||||
gsettings set org.gnome.desktop.privacy recent-files-max-age 30
|
|
||||||
gsettings set org.gnome.desktop.privacy remove-old-temp-files true
|
|
||||||
gsettings set org.gnome.desktop.privacy remove-old-trash-files true
|
|
||||||
gsettings set org.gnome.desktop.privacy report-technical-problems false
|
|
||||||
gsettings set org.gnome.desktop.privacy send-software-usage-stats false
|
|
||||||
gsettings set org.gnome.desktop.screensaver lock-enabled false
|
|
||||||
gsettings set org.gnome.desktop.search-providers disabled "['org.gnome.Epiphany.desktop']"
|
|
||||||
gsettings set org.gnome.desktop.wm.keybindings maximize-vertically "['<Super>w']"
|
|
||||||
gsettings set org.gnome.desktop.wm.keybindings switch-applications "['<Super>Tab']"
|
|
||||||
gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "['<Shift><Super>Tab']"
|
|
||||||
gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<Alt>Tab']"
|
|
||||||
gsettings set org.gnome.desktop.wm.keybindings switch-windows-backward "['<Shift><Alt>Tab']"
|
|
||||||
gsettings set org.gnome.desktop.wm.keybindings toggle-fullscreen "['<Super>f']"
|
|
||||||
gsettings set org.gnome.desktop.wm.preferences resize-with-right-button true
|
|
||||||
gsettings set org.gnome.settings-daemon.plugins.media-keys logout '[]'
|
|
||||||
gsettings set org.gnome.settings-daemon.plugins.media-keys volume-step 2
|
|
||||||
gsettings set org.gnome.settings-daemon.plugins.power power-button-action 'interactive'
|
|
||||||
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing'
|
|
||||||
|
|
||||||
gsettings set org.gnome.desktop.interface icon-theme 'Numix'
|
|
||||||
sleep 1
|
|
||||||
gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'
|
|
||||||
'')
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
sconfig.user-settings = ''
|
||||||
|
gsettings set org.gnome.desktop.interface enable-hot-corners false
|
||||||
|
gsettings set org.gnome.desktop.interface show-battery-percentage true
|
||||||
|
gsettings set org.gnome.desktop.media-handling automount false
|
||||||
|
gsettings set org.gnome.desktop.media-handling autorun-never true
|
||||||
|
gsettings set org.gnome.desktop.notifications show-in-lock-screen false
|
||||||
|
gsettings set org.gnome.desktop.privacy recent-files-max-age 30
|
||||||
|
gsettings set org.gnome.desktop.privacy remove-old-temp-files true
|
||||||
|
gsettings set org.gnome.desktop.privacy remove-old-trash-files true
|
||||||
|
gsettings set org.gnome.desktop.privacy report-technical-problems false
|
||||||
|
gsettings set org.gnome.desktop.privacy send-software-usage-stats false
|
||||||
|
gsettings set org.gnome.desktop.screensaver lock-enabled false
|
||||||
|
gsettings set org.gnome.desktop.search-providers disabled "['org.gnome.Epiphany.desktop']"
|
||||||
|
gsettings set org.gnome.desktop.wm.keybindings maximize-vertically "['<Super>w']"
|
||||||
|
gsettings set org.gnome.desktop.wm.keybindings switch-applications "['<Super>Tab']"
|
||||||
|
gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "['<Shift><Super>Tab']"
|
||||||
|
gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<Alt>Tab']"
|
||||||
|
gsettings set org.gnome.desktop.wm.keybindings switch-windows-backward "['<Shift><Alt>Tab']"
|
||||||
|
gsettings set org.gnome.desktop.wm.keybindings toggle-fullscreen "['<Super>f']"
|
||||||
|
gsettings set org.gnome.desktop.wm.preferences resize-with-right-button true
|
||||||
|
gsettings set org.gnome.settings-daemon.plugins.media-keys logout '[]'
|
||||||
|
gsettings set org.gnome.settings-daemon.plugins.media-keys volume-step 2
|
||||||
|
gsettings set org.gnome.settings-daemon.plugins.power power-button-action 'interactive'
|
||||||
|
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing'
|
||||||
|
|
||||||
|
gsettings set org.gnome.desktop.interface icon-theme 'Numix'
|
||||||
|
gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'
|
||||||
|
'';
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,13 +77,13 @@ in
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
||||||
(writeShellScriptBin "my-vscode-settings" ''
|
|
||||||
ln -sf /etc/vscode-settings.json ~/.config/VSCodium/User/settings.json
|
|
||||||
ln -sf /etc/vscode-keybindings.json ~/.config/VSCodium/User/keybindings.json
|
|
||||||
'')
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
sconfig.user-settings = ''
|
||||||
|
ln -sf /etc/vscode-settings.json ~/.config/VSCodium/User/settings.json
|
||||||
|
ln -sf /etc/vscode-keybindings.json ~/.config/VSCodium/User/keybindings.json
|
||||||
|
'';
|
||||||
|
|
||||||
environment.etc."vscode-settings.json".text = builtins.toJSON {
|
environment.etc."vscode-settings.json".text = builtins.toJSON {
|
||||||
"editor.renderFinalNewline" = false;
|
"editor.renderFinalNewline" = false;
|
||||||
"editor.scrollBeyondLastLine" = false;
|
"editor.scrollBeyondLastLine" = false;
|
||||||
|
|
16
modules/user-settings.nix
Normal file
16
modules/user-settings.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.sconfig.user-settings;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.sconfig.user-settings = lib.mkOption {
|
||||||
|
type = lib.types.nullOr lib.types.lines;
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf (cfg != null) {
|
||||||
|
environment.systemPackages = [
|
||||||
|
(pkgs.writeShellScriptBin "my-settings" cfg)
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue