-
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
1f2e5c8
commit d62d1c5
Showing
5 changed files
with
37 additions
and
55 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
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,17 @@ | ||
#!/usr/bin/env bash | ||
# flake-world equivalent to 'home-manager switch' | ||
# The pre-flake way of using home manager had a ~home-manager switch~ command | ||
# which would build and then activate the next home manager generation. This is | ||
# the flake "equivalent". Having it as a shell command makes it easier to run. | ||
|
||
# Also, this script obviously requires the ~WORKSTATION_NAME~ environment variable | ||
# to be set, which provides the 'identity' of the current machine -- not all | ||
# machines have the same home manager configurations. | ||
|
||
# [[file:../../../workstation.org::*flake-world equivalent to 'home-manager switch'][flake-world equivalent to 'home-manager switch':1]] | ||
set -u # error in case WORKSTATION_NAME is not set | ||
|
||
nix build --no-link ~/workstation/#homeConfigurations.${WORKSTATION_NAME}.$(whoami).activationPackage --show-trace | ||
|
||
"$(nix path-info ~/workstation/#homeConfigurations.${WORKSTATION_NAME}.$(whoami).activationPackage)"/activate --show-trace | ||
# flake-world equivalent to 'home-manager switch':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 |
---|---|---|
@@ -1,10 +1,8 @@ | ||
#!/usr/bin/env bash | ||
# [[file:../../../workstation.org::*Install home manager][Install home manager:2]] | ||
function install_home_manager() { | ||
export HOME_MANAGER_BACKUP_EXT=old | ||
# Install home manager | ||
|
||
nix run home-manager/$WORKSTATION_HOME_MANAGER_VERSION -- init ~/workstation | ||
} | ||
# [[file:../../../workstation.org::*Install home manager][Install home manager:1]] | ||
export HOME_MANAGER_BACKUP_EXT=old | ||
|
||
install_home_manager | ||
# Install home manager:2 ends here | ||
nix run home-manager/$WORKSTATION_HOME_MANAGER_VERSION -- init ~/workstation | ||
# Install home manager: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