~ruther/guix-config

guix-config/Makefile -rw-r--r-- 1.8 KiB
0eb49edb — Rutherther feat: add simple iso for making openpgp keys 2 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
.PHONY: system-reconfigure system-vm system-container system-build pull home-reconfigure home-vm home-container home-build

SYSTEM_ARGS = -L ./modules ./config.scm
HOME_ARGS = -L ./home/modules ./home/home-configuration.scm
TIMEMACHINE = guix time-machine -C channels-lock.scm

GUIX=target/guix/bin/guix

target: channels-lock.scm channels-profile.scm channels-manifest.scm
	rm -rf target
	mkdir -p target
	guix build \
    -f ./channels-profile.scm \
		-r ./target/guix

pull: channels-lock.scm channels-manifest.scm target
  # TODO: investigate what guix version to use here.
  # How to ensure it is not built twice unnecessarily?
  # The problem is that guix-for-channels actually produces
  # a different derivation if we are in different current guix.
  # Maybe it would make sense to have sort of a bootstrap guix
  # built that will not be updated so regularly, and be used
  # only to obtain the guix instances?
	guix package --profile='~/.config/guix/current' \
    --manifest=./channels-manifest.scm

system-build: channels-lock.scm target
	$(GUIX) system build $(SYSTEM_ARGS)

system-reconfigure: channels-lock.scm target
	$(GUIX) system reconfigure $(SYSTEM_ARGS) --cores=10 --max-jobs=5

system-vm: channels-lock.scm target
	$(GUIX) system vm $(SYSTEM_ARGS)

system-container: channels-lock.scm target
	$(GUIX) system container $(SYSTEM_ARGS)

home-build: channels-lock.scm target
	$(GUIX) home build $(HOME_ARGS)

home-reconfigure: channels-lock.scm target
	$(GUIX) home reconfigure $(HOME_ARGS) --cores=10 --max-jobs=5

home-container: channels-lock.scm target
	$(GUIX) home container $(HOME_ARGS)

system-repl: channels-lock.scm target
	$(GUIX) repl -L modules -i ./repl-init.scm

channels-lock.scm: channels.scm
	guix time-machine -C channels.scm -- describe -f channels > channels-lock.scm
Do not follow this link