From 9878e47921bb5d85956f96f83dd5a30fdba320aa Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Mon, 9 Dec 2024 10:13:04 +0300 Subject: [PATCH] Makefile: Add cached & no-nixconf targets. --- Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 7949d25..2a1f2c8 100644 --- a/Makefile +++ b/Makefile @@ -13,10 +13,8 @@ android: boot: fix-ulimit fix-unlock nixos-rebuild boot $(options) --flake $(flake) -boot-no-nixconf: fix-ulimit fix-unlock - mv /etc/nix/nix.conf /etc/nix/nix.conf_; \ - nixos-rebuild boot $(options) --flake $(flake); \ - mv /etc/nix/nix.conf_ /etc/nix/nix.conf +cached: + $(eval options := $(subst eval-cache false,eval-cache true,$(options))) check: nix flake check --show-trace @@ -30,6 +28,10 @@ fix-ulimit: fix-unlock: pkill nixos-rebuild || true +# HACK: Bring back the nix config. +fix-nixconf: + mv /etc/nix/nix.conf_ /etc/nix/nix.conf + gc: nix-collect-garbage -d # nix-store --gc @@ -60,6 +62,9 @@ install-hm: live: nix build -o live $(options) $(flake)#nixosConfigurations.live.config.system.build.isoImage +no-nixconf: + mv /etc/nix/nix.conf /etc/nix/nix.conf_ || true + reboot: boot reboot