[nixos] Add small bootstrapper for new hosts
This commit is contained in:
parent
c7182baef7
commit
bed887baa4
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [[ $UID != 0 ]]; then
|
||||
echo "Please run me as root"
|
||||
exit 1
|
||||
fi;
|
||||
|
||||
CHEZMOI_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )/../" &> /dev/null && pwd )
|
||||
|
||||
mkdir -p /root/.config/fish
|
||||
|
||||
ln -sfn "${CHEZMOI_DIR}/dot_config/nixos" /etc/nixos
|
||||
cp "${CHEZMOI_DIR}/bootstrap/root.config.fish" /root/.config/fish/config.fish
|
||||
git config --global credential.helper store
|
||||
|
||||
pushd /etc/nixos
|
||||
nix flake update
|
||||
nixos-rebuild switch --upgrade
|
|
@ -0,0 +1,5 @@
|
|||
set fish_greeting
|
||||
if status is-interactive
|
||||
set -x LC_ALL en_US.UTF-8
|
||||
set -x LC_CTYPE en_US.UTF-8
|
||||
end
|
Loading…
Reference in New Issue