Rename nixos config files to use just hostname

This commit is contained in:
Evie Litherland-Smith 2023-04-28 11:50:11 +01:00
parent c26950fc2f
commit 8ed8fb15d8
4 changed files with 4 additions and 3 deletions

View file

@ -11,14 +11,15 @@ SSH_TARGETS := $(SSH_ITEMS:ssh/%=$(SSH_DIR)/%)
.PHONY: default all clean link home nixos install .PHONY: default all clean link home nixos install
default: install home default: install
all: default install home all: nixos
clean: clean:
rm $(SSH_DIR)/config.d rm $(SSH_DIR)/config.d
rm $(HOME)/.inputrc rm $(HOME)/.inputrc
rm -rf $(HOME)/.local/share/nvim rm -rf $(HOME)/.local/share/nvim
sudo rm /etc/nixos/$(HOSTNAME).nix
$(CONFIG_DIR) $(SSH_DIR) $(CONFIG_DIR)/home-manager: $(CONFIG_DIR) $(SSH_DIR) $(CONFIG_DIR)/home-manager:
mkdir -p $@ mkdir -p $@
@ -40,7 +41,7 @@ $(CONFIG_DIR)/home-manager/home.nix: $(CONFIG_DIR)/home-manager
nixos: /etc/nixos/$(HOSTNAME)-$(USER).nix nixos: /etc/nixos/$(HOSTNAME)-$(USER).nix
/etc/nixos/$(HOSTNAME)-$(USER).nix: /nix /etc/nixos/$(HOSTNAME).nix: /nix
[ -f $(NIXOS_CONFIG) ] || touch $(NIXOS_CONFIG) [ -f $(NIXOS_CONFIG) ] || touch $(NIXOS_CONFIG)
sudo ln -s $(NIXOS_CONFIG) $@ sudo ln -s $(NIXOS_CONFIG) $@