diff options
| author | nsfisis <nsfisis@gmail.com> | 2023-09-05 21:39:32 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2023-09-05 21:39:32 +0900 |
| commit | 6ad1005a6a0380cdc3f43af0e9ebe973df5c4e29 (patch) | |
| tree | cfac2924c143cd2f3e10840e8ceda874795aca3b /bootstrap.sh | |
| parent | 4dc31696a7950f870a5d48f56b645cec921efa78 (diff) | |
| download | dotfiles-6ad1005a6a0380cdc3f43af0e9ebe973df5c4e29.tar.gz dotfiles-6ad1005a6a0380cdc3f43af0e9ebe973df5c4e29.tar.zst dotfiles-6ad1005a6a0380cdc3f43af0e9ebe973df5c4e29.zip | |
bootstrap: refactor a bit
Diffstat (limited to 'bootstrap.sh')
| -rwxr-xr-x | bootstrap.sh | 8 |
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 |
