From 6ad1005a6a0380cdc3f43af0e9ebe973df5c4e29 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 5 Sep 2023 21:39:32 +0900 Subject: bootstrap: refactor a bit --- bootstrap.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'bootstrap.sh') 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 -- cgit v1.2.3-70-g09d2