diff --git a/Makefile b/Makefile index 6583641f..bda1e51c 100644 --- a/Makefile +++ b/Makefile @@ -6,8 +6,6 @@ CONFIG_TARGETS := $(CONFIG_ITEMS:config/%=$(CONFIG_DIR)/%) SSH_ITEMS := $(wildcard ssh/*) SSH_TARGETS := $(SSH_ITEMS:ssh/%=$(SSH_DIR)/%) -LAZY_REPO := https://github.com/folke/lazy.nvim.git - .PHONY: default all clean check directories link install default: directories link @@ -17,7 +15,8 @@ all: default install clean: for link in $(CONFIG_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) @@ -32,7 +31,7 @@ $(HOME)/.inputrc: $(HOME)/%: % $(CONFIG_TARGETS) $(SSH_DIR)/config.d $(HOME)/.inputrc: ln -s $(PWD)/$? $@ -install: $(LAZY_DIR) +install: /nix -$(LAZY_DIR): - git clone --depth 1 $(LAZY_REPO) $@ +/nix: + command -v nix > /dev/null && echo "Nix already installed" || sh <(curl -L https://nixos.org/nix/install) --daemon