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,8 +37,9 @@ in
|
|||
echo "Nightlight: $x"
|
||||
gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled $x
|
||||
'')
|
||||
];
|
||||
|
||||
(writeShellScriptBin "gnome-my-settings" ''
|
||||
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
|
||||
|
@ -64,10 +65,8 @@ in
|
|||
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'
|
||||
'')
|
||||
];
|
||||
'';
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -77,12 +77,12 @@ in
|
|||
};
|
||||
})
|
||||
|
||||
(writeShellScriptBin "my-vscode-settings" ''
|
||||
];
|
||||
|
||||
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 {
|
||||
"editor.renderFinalNewline" = 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