diff options
author | Jacob Janzen <jacob.a.s.janzen@gmail.com> | 2024-12-15 22:03:02 -0600 |
---|---|---|
committer | Jacob Janzen <jacob.a.s.janzen@gmail.com> | 2024-12-15 22:03:02 -0600 |
commit | 69a5a1909e3481ddeb41d4c96f3c145413a383d0 (patch) | |
tree | 22852a056647d9e31e9248f739703e7023da48ac /Makefile | |
parent | c4f485441a92135bf0d2829a92e7ba4f0219b0d5 (diff) |
cleanup makefile
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 29 |
1 files changed, 5 insertions, 24 deletions
@@ -1,8 +1,7 @@ .PHONY: install update macos-update macos-install nixos-update nixos-install fonts # Determine the current system from its hostname. -# My university network changes my hostname on my laptop. I use the disgusting system_profiler pipeline to get the real hostname -# if the uname command fails +# My university network changes my hostname on my laptop. I use the disgusting system_profiler pipeline to get the real hostname if the uname command fails SYSTEM := $(shell uname -n) ifeq ($(wildcard src/$(project)/*),) SYSTEM = $(shell system_profiler SPSoftwareDataType | grep "Computer Name" | xargs | sed 's/Computer Name: //' | sed 's/$$/.local/') @@ -33,14 +32,11 @@ endif # update by default, install first all: update update: install $(UPDATE_TARGET) + cp $(DSTDIR)/.flake/flake.lock $(SRCDIR)/.flake # install configs and any additional targets install: $(CONFIGS) $(INSTALL_TARGET) -# ignored files -%.tar.gz: - : - # install encrypted org configs $(DSTDIR)/%: $(SRCDIR)/%.org.gpg mkdir -p $(dir $@) @@ -58,33 +54,18 @@ $(DSTDIR)/%: $(SRCDIR)/% mkdir -p $(dir $@) cp $< $@ -# install fonts -fonts: $(DSTDIR)/$(FONTSDIR)/.ComputerModern $(DSTDIR)/$(FONTSDIR)/.SauceCodePro - -fc-cache -f -$(DSTDIR)/$(FONTSDIR)/.ComputerModern: $(SRCDIR)/$(FONTSDIR)/ComputerModern.tar.gz - mkdir -p $(DSTDIR)/$(FONTSDIR) - tar xf $(SRCDIR)/$(FONTSDIR)/ComputerModern.tar.gz -C $(DSTDIR)/$(FONTSDIR) - touch $(DSTDIR)/$(FONTSDIR)/.ComputerModern -$(DSTDIR)/$(FONTSDIR)/.SauceCodePro: $(SRCDIR)/$(FONTSDIR)/SauceCodePro.tar.gz - mkdir -p $(DSTDIR)/$(FONTSDIR) - tar xf $(SRCDIR)/$(FONTSDIR)/SauceCodePro.tar.gz -C $(DSTDIR)/$(FONTSDIR) - touch $(DSTDIR)/$(FONTSDIR)/.SauceCodePro - -# macos update just runs brew upgrade macos-update: install - brew upgrade + nix flake update --flake $(DSTDIR)/.flake + darwin-rebuild switch --flake $(DSTDIR)/.flake -# macos install tells System Events to update the wallpaper +# macos install tells System Events to update the wallpaper after installation macos-install: $(CONFIGS) darwin-rebuild switch --flake $(DSTDIR)/.flake osascript -e "tell application \"System Events\" to tell every desktop to set picture to \"/$$HOME/.wallpaper\" as POSIX file" -# nixos update backs up the flake lock file nixos-update: install nix flake update $(DSTDIR)/.flake - cp $(DSTDIR)/.flake/flake.lock $(SRCDIR)/.flake sudo nixos-rebuild switch --flake $(DSTDIR)/.flake -# nixos install runs nixos-rebuild switch to install everything declaratively nixos-install: $(CONFIGS) sudo nixos-rebuild switch --flake $(DSTDIR)/.flake |