File tree Expand file tree Collapse file tree 3 files changed +32
-2
lines changed
Expand file tree Collapse file tree 3 files changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ versioning is done in a continuous fashion without worries of breaking changes.
77## patches
88
99- ` ci ` : checkout changes of branches to test with updates in motion 2025-03-04
10+ - ` nix ` : rebuild the darwin machine with an installed switch script 2025-03-03
11+ - ` nix ` : setup an installation and teardown script for mac machines 2025-03-02
1012- ` nix ` : move pulse audio from hardware to services in toms configs 2025-03-02
1113- ` nix ` : avoid global packages while overlayed other packages exist 2025-03-02
1214- ` nix ` : skip specific darwin configurations of the package manager 2025-03-02
Original file line number Diff line number Diff line change @@ -7,7 +7,9 @@ set -eo pipefail
77function help {
88 echo " help display this informative message"
99 echo " host configure the machine this runs"
10+ echo " install download tooling for dependencies"
1011 echo " switch change to the latest declarations"
12+ echo " uninstall remove the packages configured"
1113}
1214
1315# Configure the machine this runs
@@ -22,9 +24,21 @@ function host {
2224 printf " Changed hostname: \x1b[32m%s\x1b[0m\n" " $( scutil --get HostName) "
2325}
2426
27+ # Download tooling for dependencies
28+ function install {
29+ curl --proto ' =https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --determinate
30+ nix run nix-darwin/master#darwin-rebuild -- switch --flake .# "$(hostname)"
31+ }
32+
2533# Change to the latest declarations
2634function switch {
27- nix run --extra-experimental-features " nix-command flakes" nix-darwin -- switch --flake .# "$(hostname)"
35+ darwin-rebuild switch --flake .# "$(hostname)"
36+ }
37+
38+ # Remove the packages configured
39+ function uninstall {
40+ nix --extra-experimental-features " nix-command flakes" run nix-darwin#darwin-uninstaller
41+ /nix/nix-installer uninstall
2842}
2943
3044# Hint if no command is provided
Original file line number Diff line number Diff line change 33# Display this informative message
44function help {
55 echo " help display this informative message"
6+ echo " install download tooling for dependencies"
67 echo " switch change to the latest declarations"
8+ echo " uninstall remove the packages configured"
9+ }
10+
11+ # Download tooling for dependencies
12+ function install {
13+ curl --proto ' =https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --determinate
14+ nix run nix-darwin/master#darwin-rebuild -- switch --flake .# "$(hostname)"
715}
816
917# Change to the latest declarations
1018function switch {
11- nix run --extra-experimental-features " nix-command flakes" nix-darwin -- switch --flake .# "$(hostname)"
19+ darwin-rebuild switch --flake .# "$(hostname)"
20+ }
21+
22+ # Remove the packages configured
23+ function uninstall {
24+ nix --extra-experimental-features " nix-command flakes" run nix-darwin#darwin-uninstaller
25+ /nix/nix-installer uninstall
1226}
1327
1428# Hint if no command is provided
You can’t perform that action at this time.
0 commit comments