added script for activation and set vim as default (like it should be)

This commit is contained in:
mc-fucker 2021-11-06 00:33:22 +01:00
parent d5346df145
commit 35bd7166a6
2 changed files with 17 additions and 0 deletions

16
activate-config.sh Executable file
View file

@ -0,0 +1,16 @@
#!/usr/bin/env bash
_hostname="$(hostname)"
if [[ "$_hostname" == "nixos" || "$_hostname" == "" ]]; then
echo 'Please set your hostname to somethin meaningful with `hostname $NAME`!'
exit 1
fi
cd "/etc/nixos"
if [[ ! -d "systems/$_hostname" ]]; then
mkdir "systems/$_hostname"
ln ./*.nix "systems/$_hostname"
fi
for _sysconf in "systems/$_hostname/"*".nix"; do
if [[ ! -f "$(basename $_sysconf)" ]]; then
ln "$_sysconf" .
fi
done

View file

@ -30,6 +30,7 @@ in
atop = { atop = {
enable = true; enable = true;
}; };
vim.defaultEditor = true;
}; };
users.defaultUserShell = pkgs.zsh; users.defaultUserShell = pkgs.zsh;