-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d62d1c5
commit 35758db
Showing
4 changed files
with
34 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,13 @@ | ||
#!/usr/bin/env bash | ||
# [[file:../../../workstation.org::*Install nix-darwin][Install nix-darwin:2]] | ||
source ~/workstation/lib/shell/foundation.sh | ||
source ~/workstation/lib/shell/setup/workstation_setup_verions.sh | ||
|
||
function nix_darwin_rebuild_flake() { | ||
nix build --extra-experimental-features "nix-command flakes" \ | ||
~/workstation\#darwinConfigurations.${WORKSTATION_NAME}.system | ||
./result/sw/bin/darwin-rebuild switch --flake ~/workstation#${WORKSTATION_NAME} | ||
# Install nix-darwin | ||
|
||
rm -rf ./result | ||
} | ||
|
||
function install_nix_darwin() { | ||
cd $WORKSTATION_DIR | ||
nix-build https://github.com/LnL7/nix-darwin/archive/${WORKSTATION_NIX_DARWIN_VERSION}.tar.gz -A installer | ||
./result/bin/darwin-installer | ||
# [[file:../../../workstation.org::*Install nix-darwin][Install nix-darwin:1]] | ||
source ~/workstation/lib/shell/foundation.sh | ||
source ~/workstation/lib/shell/setup/workstation_setup_versions.sh | ||
|
||
nix_darwin_rebuild_flake | ||
} | ||
cd $WORKSTATION_DIR | ||
nix-build https://github.com/LnL7/nix-darwin/archive/${WORKSTATION_NIX_DARWIN_VERSION}.tar.gz -A installer | ||
./result/bin/darwin-installer | ||
|
||
install_nix_darwin | ||
# Install nix-darwin:2 ends here | ||
source ~/workstation/lib/shell/setup/nix-darwin-rebuild-flake.sh | ||
# Install nix-darwin:1 ends here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
# command to have darwin build and switch to next generation | ||
|
||
# [[file:../../../workstation.org::*command to have darwin build and switch to next generation][command to have darwin build and switch to next generation:1]] | ||
set -u # error in case WORKSTATION_NAME is not set | ||
|
||
nix build --extra-experimental-features "nix-command flakes" \ | ||
~/workstation\#darwinConfigurations.${WORKSTATION_NAME}.system | ||
./result/sw/bin/darwin-rebuild switch --flake ~/workstation#${WORKSTATION_NAME} | ||
|
||
rm -rf ./result | ||
# command to have darwin build and switch to next generation:1 ends here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters