Add nix installed to makefile

This commit is contained in:
Evie Litherland-Smith 2023-04-11 10:14:55 +01:00
parent 480e99c942
commit 331a6c5c5f

View file

@ -6,8 +6,6 @@ CONFIG_TARGETS := $(CONFIG_ITEMS:config/%=$(CONFIG_DIR)/%)
SSH_ITEMS := $(wildcard ssh/*) SSH_ITEMS := $(wildcard ssh/*)
SSH_TARGETS := $(SSH_ITEMS:ssh/%=$(SSH_DIR)/%) SSH_TARGETS := $(SSH_ITEMS:ssh/%=$(SSH_DIR)/%)
LAZY_REPO := https://github.com/folke/lazy.nvim.git
.PHONY: default all clean check directories link install .PHONY: default all clean check directories link install
default: directories link default: directories link
@ -17,7 +15,8 @@ all: default install
clean: clean:
for link in $(CONFIG_TARGETS); do rm "$$link"; done for link in $(CONFIG_TARGETS); do rm "$$link"; done
for link in $(SSH_TARGETS); do rm "$$link"; done for link in $(SSH_TARGETS); do rm "$$link"; done
rm -rf $(LAZY_DIR) rm $(HOME)/.inputrc
rm -rf $(HOME)/.local/share/nvim
directories: $(CONFIG_DIR) $(SSH_DIR) directories: $(CONFIG_DIR) $(SSH_DIR)
@ -32,7 +31,7 @@ $(HOME)/.inputrc: $(HOME)/%: %
$(CONFIG_TARGETS) $(SSH_DIR)/config.d $(HOME)/.inputrc: $(CONFIG_TARGETS) $(SSH_DIR)/config.d $(HOME)/.inputrc:
ln -s $(PWD)/$? $@ ln -s $(PWD)/$? $@
install: $(LAZY_DIR) install: /nix
$(LAZY_DIR): /nix:
git clone --depth 1 $(LAZY_REPO) $@ command -v nix > /dev/null && echo "Nix already installed" || sh <(curl -L https://nixos.org/nix/install) --daemon