-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (37 loc) · 1.38 KB
/
Copy pathMakefile
File metadata and controls
41 lines (37 loc) · 1.38 KB
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
HOSTNAME = $(shell hostname)
USER = $(shell whoami)
ifndef HOSTNAME
$(error Hostname unknown)
endif
ifndef USER
$(error User unknown)
endif
help:
@echo "Available targets:"
@echo " home - Switches the home-manager configuration. Use 'light' to override darkmode_flag."
@echo " home_build - Builds and switches the home-manager configuration, then reboots the system."
@echo " os - Rebuilds the NixOS configuration."
@echo " iso - Builds an ISO image of the NixOS configuration."
@echo " vm - Builds a VM of the NixOS configuration."
home:
ifdef light
home-manager switch -b backup --flake ~/dev/ripxonix/#${USER}@${HOSTNAME} --override-input darkmode_flag github:boolean-option/false
else
home-manager switch -b backup --flake ~/dev/ripxonix/#${USER}@${HOSTNAME}
endif
# FIXME No idea why I have to issue `nix profile list` first, if I don't, I get
# no suitable profile found from home-manager?
home_build:
sudo chown -R ripxorip:users /home/ripxorip
nix profile list
home-manager build -b backup --flake ~/dev/ripxonix/#${USER}@${HOSTNAME}
-home-manager switch -b backup --flake ~/dev/ripxonix/#${USER}@${HOSTNAME}
echo "Rebooting in 3 seconds"
sleep 3
sudo reboot
os:
sudo nixos-rebuild switch --flake ~/dev/ripxonix/#${HOSTNAME}
iso:
nix build .#nixosConfigurations.iso-desktop.config.system.build.isoImage
vm:
nix build .#nixosConfigurations.ripxovm_qcow