Move home-manager to individual rule set
This commit is contained in:
parent
143132b598
commit
615d8af923
12
Makefile
12
Makefile
|
@ -9,11 +9,11 @@ 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)/%)
|
||||||
|
|
||||||
.PHONY: default all clean check directories link install
|
.PHONY: default all clean check directories link home install
|
||||||
|
|
||||||
default: directories link
|
default: directories link
|
||||||
|
|
||||||
all: default install
|
all: default install home
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
for link in $(CONFIG_TARGETS); do rm "$$link"; done
|
for link in $(CONFIG_TARGETS); do rm "$$link"; done
|
||||||
|
@ -21,12 +21,12 @@ clean:
|
||||||
rm $(HOME)/.inputrc
|
rm $(HOME)/.inputrc
|
||||||
rm -rf $(HOME)/.local/share/nvim
|
rm -rf $(HOME)/.local/share/nvim
|
||||||
|
|
||||||
directories: $(CONFIG_DIR) $(SSH_DIR) $(CONFIG_DIR)/home-manager
|
directories: $(CONFIG_DIR) $(SSH_DIR)
|
||||||
|
|
||||||
$(CONFIG_DIR) $(SSH_DIR) $(CONFIG_DIR)/home-manager:
|
$(CONFIG_DIR) $(SSH_DIR) $(CONFIG_DIR)/home-manager:
|
||||||
mkdir -p $@
|
mkdir -p $@
|
||||||
|
|
||||||
link: $(CONFIG_TARGETS) $(SSH_DIR)/config.d $(HOME)/.inputrc $(CONFIG_DIR)/home-manager/home.nix
|
link: $(CONFIG_TARGETS) $(SSH_DIR)/config.d $(HOME)/.inputrc
|
||||||
|
|
||||||
$(CONFIG_TARGETS): $(CONFIG_DIR)/%: config/%
|
$(CONFIG_TARGETS): $(CONFIG_DIR)/%: config/%
|
||||||
$(SSH_DIR)/config.d: $(SSH_DIR)/%: ssh/%
|
$(SSH_DIR)/config.d: $(SSH_DIR)/%: ssh/%
|
||||||
|
@ -34,7 +34,9 @@ $(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)/$? $@
|
||||||
|
|
||||||
$(CONFIG_DIR)/home-manager/home.nix:
|
home: $(CONFIG_DIR)/home-manager/home.nix
|
||||||
|
|
||||||
|
$(CONFIG_DIR)/home-manager/home.nix: $(CONFIG_DIR)/home-manager
|
||||||
ln -s $(HOMEMANAGER_CONFIG) $@
|
ln -s $(HOMEMANAGER_CONFIG) $@
|
||||||
|
|
||||||
install: /nix /etc/nixos/$(HOSTNAME)-$(USER).nix
|
install: /nix /etc/nixos/$(HOSTNAME)-$(USER).nix
|
||||||
|
|
Loading…
Reference in a new issue