Link home-manager config file for current machine
This commit is contained in:
parent
7c2093d173
commit
57812c539b
10
Makefile
10
Makefile
|
@ -1,3 +1,4 @@
|
|||
$(eval HOSTNAME=$(shell hostname))
|
||||
CONFIG_DIR := $(if $(XDG_CONFIG_HOME), $(XDG_CONFIG_HOME), $(HOME)/.config)
|
||||
SSH_DIR := $(HOME)/.ssh
|
||||
|
||||
|
@ -18,12 +19,12 @@ clean:
|
|||
rm $(HOME)/.inputrc
|
||||
rm -rf $(HOME)/.local/share/nvim
|
||||
|
||||
directories: $(CONFIG_DIR) $(SSH_DIR)
|
||||
directories: $(CONFIG_DIR) $(SSH_DIR) $(CONFIG_DIR)/home-manager
|
||||
|
||||
$(CONFIG_DIR) $(SSH_DIR):
|
||||
$(CONFIG_DIR) $(SSH_DIR) $(CONFIG_DIR)/home-manager:
|
||||
mkdir -p $@
|
||||
|
||||
link: $(CONFIG_TARGETS) $(SSH_DIR)/config.d $(HOME)/.inputrc
|
||||
link: $(CONFIG_TARGETS) $(SSH_DIR)/config.d $(HOME)/.inputrc $(CONFIG_DIR)/home-manager/home.nix
|
||||
|
||||
$(CONFIG_TARGETS): $(CONFIG_DIR)/%: config/%
|
||||
$(SSH_DIR)/config.d: $(SSH_DIR)/%: ssh/%
|
||||
|
@ -31,6 +32,9 @@ $(HOME)/.inputrc: $(HOME)/%: %
|
|||
$(CONFIG_TARGETS) $(SSH_DIR)/config.d $(HOME)/.inputrc:
|
||||
ln -s $(PWD)/$? $@
|
||||
|
||||
$(CONFIG_DIR)/home-manager/home.nix:
|
||||
ln -s $(PWD)/home/$(HOSTNAME)-$(USER).nix $@
|
||||
|
||||
install: /nix
|
||||
|
||||
/nix:
|
||||
|
|
Loading…
Reference in a new issue