| runme | ||||
|---|---|---|---|---|
|
bash < <(curl -s https://raw.githubusercontent.com/babashka/babashka/master/install)Recommended install from https://nixos.org/download/
Note: This will request sudo
sh <(curl -L https://nixos.org/nix/install) --daemonFlakes support requires a feature flag to be set still.
mkdir -p ~/.config/nix
echo "experimental-features = nix-command flakes" > ~/.config/nix/nix.confcurl -L https://git.io/epre | shList all tasks
bb tasksList GPG secret keys
bb list-secret-keysUpdate package lock files
nix flake updateUpdate user-level configuration
nh home switch ${HOME?}/dotfiles -- --impure --show-tracebb switch-homeswitch homeUpdate OS configuration
nh os switch ${HOME?}/dotfiles -- --impure --show-traceDeploy to remote servers (edgenix and nasnix). All builds happen locally with nom for better progress display, then packages are copied to remote hosts.
Build configurations locally to see what will be deployed:
# Build NixOS configs (no activation)
bb build-remote-os-edgenix
bb build-remote-os-nasnix
# Build home-manager configs (no activation)
bb build-remote-home-edgenix
bb build-remote-home-nasnixSee what packages will change between current and new system (similar to nh local diffs):
# Show package changes for edgenix
bb diff-remote-os-edgenix
# Show package changes for nasnix
bb diff-remote-os-nasnixPreview changes without applying them:
# See what would change on edgenix
bb dry-run-remote-os-edgenix
# See what would change on nasnix
bb dry-run-remote-os-nasnixBuild locally and activate on remote:
# Switch both NixOS and home-manager on both hosts
bb switch-remote
# Switch both NixOS and home-manager on specific host
bb switch-remote-edgenix
bb switch-remote-nasnix
# Switch only NixOS (builds with nom locally, then copies and activates remotely)
bb switch-remote-os-edgenix
bb switch-remote-os-nasnix
# Switch only home-manager (builds with nom locally, copies, then activates remotely)
bb switch-remote-home-edgenix
bb switch-remote-home-nasnixHow it works:
- NixOS: Builds with
nom buildlocally, then usesnixos-rebuild switch --target-hostto copy and activate - Home-manager: Builds activation package with
nom buildlocally, copies withnix copy, then activates remotely
Prerequisites:
- SSH key-based authentication set up for
edgenixandnasnix - Remote hosts accessible via their hostnames (configure
~/.ssh/configif needed) - Remote hosts must have Nix installed and configured to accept SSH-based store access
- Remote user needs sudo access (tasks will prompt for sudo password when switching NixOS configurations)
Restart the computer
sudo reboot