-
Notifications
You must be signed in to change notification settings - Fork 80
Expand file tree
/
Copy pathswitch
More file actions
executable file
·86 lines (73 loc) · 1.74 KB
/
switch
File metadata and controls
executable file
·86 lines (73 loc) · 1.74 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#! /usr/bin/env bash
# Shows the output of every command
set +x
activate_hm() {
result/activate
}
rebuild_xmonad_edp() {
nom build .#homeConfigurations.xmonad-edp.activationPackage
activate_hm
}
rebuild_xmonad_hdmi() {
nom build .#homeConfigurations.xmonad-hdmi.activationPackage
activate_hm
}
rebuild_hyprland_edp() {
nom build .#homeConfigurations.hyprland-edp.activationPackage
activate_hm
}
rebuild_hyprland_hdmi() {
nom build .#homeConfigurations.hyprland-hdmi.activationPackage
activate_hm
}
rebuild_hyprland_hdmi_mutable() {
nom build .#homeConfigurations.hyprland-hdmi-mutable.activationPackage
activate_hm
}
rebuild_niri_edp() {
nom build .#homeConfigurations.niri-edp.activationPackage
activate_hm
}
rebuild_niri_hdmi() {
nom build .#homeConfigurations.niri-hdmi.activationPackage
activate_hm
}
rebuild_thinkpad() {
sudo nixos-rebuild switch --flake .#thinkpad-x1
}
rebuild_tongfang() {
# nix build .#nixosConfigurations.tongfang-amd.config.system.build.toplevel
# sudo result/bin/switch-to-configuration switch
sudo nixos-rebuild switch --flake .#tongfang-amd
}
rebuild_tongfang_vm() {
nixos-rebuild build-vm --flake .#tongfang-amd
}
case $1 in
"niri")
rebuild_niri_hdmi;;
"niri-edp")
rebuild_niri_edp;;
"xmedp")
rebuild_xmonad_edp;;
"xmhdmi")
rebuild_xmonad_hdmi;;
"hpedp")
rebuild_hyprland_edp;;
"hphdmi")
rebuild_hyprland_hdmi;;
"hphdmi-mutable")
rebuild_hyprland_hdmi_mutable;;
"update-fish")
fish -c fish_update_completions;;
"update-nix-index")
nix-index --filter-prefix '/bin/';;
"thinkpad")
rebuild_thinkpad;;
"tongfang")
rebuild_tongfang;;
"vm")
rebuild_tongfang_vm;;
*)
echo "Wrong argument: look at the switch script.";;
esac