Add make step to clone nvim repo

This commit is contained in:
Evie Litherland-Smith 2023-06-18 10:47:48 +01:00
parent 840bd79369
commit 92062ff584

View file

@ -3,9 +3,9 @@ HOMEMANAGER_CONFIG := $(PWD)/machines/$(HOSTNAME)/$(USER).nix
CONFIG_DIR := $(if $(XDG_CONFIG_HOME), $(XDG_CONFIG_HOME), $(HOME)/.config)
HOMEMANAGER_CONFIG_DIR := $(CONFIG_DIR)/home-manager
.PHONY: default clean nixos home /etc/nixos/config
.PHONY: default clean nixos home /etc/nixos/config nvim
default:
default: nvim
command -v nix > /dev/null || exit 1
[ -e /etc/nixos/ ] && make nixos || make home
bat cache --build
@ -22,11 +22,17 @@ home: $(HOMEMANAGER_CONFIG_DIR)/home.nix
/etc/nixos/config:
sudo rsync -avz --exclude-from=.rsyncignore --filter=':- .gitignore' --delete-during --delete-excluded ./ $@
nvim: $(CONFIG_DIR)/nvim
$(HOMEMANAGER_CONFIG):
touch $@
$(HOMEMANAGER_CONFIG_DIR)/home.nix: $(HOMEMANAGER_CONFIG) $(HOMEMANAGER_CONFIG_DIR) /nix
-ln -s $(HOMEMANAGER_CONFIG) $@
$(CONFIG_DIR)/nvim: $(CONFIG_DIR)
-git clone https://git.xenia.me.uk/xenia/nvim.git $@
touch $@
$(CONFIG_DIR) $(HOMEMANAGER_CONFIG_DIR):
mkdir -p $@