aboutsummaryrefslogtreecommitdiff
path: root/bin/reconfigure
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-04-25 15:55:54 -0300
committerEuAndreh <eu@euandre.org>2024-04-25 15:55:54 -0300
commit0b720343053dd0f67faa53698ebe748fbeddc6b3 (patch)
treecd6faedf9acf2c82405483f9f728079a33ea978e /bin/reconfigure
parentetc/sh/rc: export $TD_USE_BUILTIN_HOOKS (diff)
downloaddotfiles-0b720343053dd0f67faa53698ebe748fbeddc6b3.tar.gz
dotfiles-0b720343053dd0f67faa53698ebe748fbeddc6b3.tar.xz
Revert "Remove Nix/NixOS support from configuration and utilities"
This reverts commit 3b2d27457db9ef8911893fa1b843560f1ccab2eb.
Diffstat (limited to 'bin/reconfigure')
-rwxr-xr-xbin/reconfigure6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/reconfigure b/bin/reconfigure
index 2df3ee7..14a8629 100755
--- a/bin/reconfigure
+++ b/bin/reconfigure
@@ -21,6 +21,7 @@ help() {
Switches the system:
- reconfigure the Guix "home" environment;
- Guix "system" if it exists;
+ - NixOS if it exists.
Examples:
@@ -94,6 +95,11 @@ pass show "$(hostname)"/andreh |
head -n1 |
sudo -ES guix system -v3 reconfigure "$XDG_CONFIG_HOME"/guix/system.scm
+if [ -e /etc/nixos/configuration.nix ]; then
+ pass show "$HOSTNAME"/andreh |
+ head -n1 |
+ sudo -S nixos-rebuild switch
+fi
bins > /dev/null