aboutsummaryrefslogtreecommitdiffhomepage
path: root/bootstrap.sh
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2023-09-05 21:39:32 +0900
committernsfisis <nsfisis@gmail.com>2023-09-05 21:39:32 +0900
commit6ad1005a6a0380cdc3f43af0e9ebe973df5c4e29 (patch)
treecfac2924c143cd2f3e10840e8ceda874795aca3b /bootstrap.sh
parent4dc31696a7950f870a5d48f56b645cec921efa78 (diff)
downloaddotfiles-6ad1005a6a0380cdc3f43af0e9ebe973df5c4e29.tar.gz
dotfiles-6ad1005a6a0380cdc3f43af0e9ebe973df5c4e29.tar.zst
dotfiles-6ad1005a6a0380cdc3f43af0e9ebe973df5c4e29.zip
bootstrap: refactor a bit
Diffstat (limited to 'bootstrap.sh')
-rwxr-xr-xbootstrap.sh8
1 files changed, 2 insertions, 6 deletions
diff --git a/bootstrap.sh b/bootstrap.sh
index 4f1b018..0f22017 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -32,16 +32,12 @@ if [ ! -d /nix ]; then
sh .bootstrap/nix-install --daemon
hash -r
fi
-if grep -q "nix-command flakes" /etc/nix/nix.conf; then
- :
-else
+if ! grep -q "nix-command flakes" /etc/nix/nix.conf; then
echo "experimental-features = nix-command flakes" | sudo tee -a /etc/nix/nix.conf > /dev/null
fi
if [ ! -d "$HOME/.local/state/nix/profiles" ]; then
mkdir -p "$HOME/.local/state/nix/profiles"
fi
-if type home-manager > /dev/null 2>&1; then
- :
-else
+if ! type home-manager > /dev/null 2>&1; then
nix run "nixpkgs#home-manager" -- switch --flake ".#$1"
fi