diff --git a/Makefile b/Makefile index e2e85885..b069f825 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ $(eval HOSTNAME=$(shell hostname)) -NIXOS_CONFIG := $(PWD)/$(HOSTNAME).nix +CONFIG_REPO := git@gitlab.com:elitherl/nixos.git HOMEMANAGER_CONFIG := $(PWD)/home/$(HOSTNAME)-$(USER).nix CONFIG_DIR := $(if $(XDG_CONFIG_HOME), $(XDG_CONFIG_HOME), $(HOME)/.config) BIN_DIR := $(HOME)/.local/bin @@ -20,11 +20,10 @@ clean: /nix: command -v nix > /dev/null && echo "Nix already installed" || ./scripts/installers/nix.sh --daemon -nixos: /etc/nixos/$(HOSTNAME).nix +/etc/nixos/config: + sudo git clone $(CONFIG_REPO) /etc/nixos/config -/etc/nixos/$(HOSTNAME).nix: /nix - [ -f $(NIXOS_CONFIG) ] || touch $(NIXOS_CONFIG) - sudo ln -s $(NIXOS_CONFIG) $@ +nixos: /etc/nixos/config home: $(HOMEMANAGER_CONFIG_DIR)/home.nix