Applying Changes

Day-to-Day Workflow

The core loop is: edit → switch → done.

Switch to Your New Configuration

decknix switch

This runs darwin-rebuild switch under the hood, applying both system and home-manager changes atomically.

Dry Run (Build Without Activating)

decknix switch --dry-run

Builds the configuration to check for errors without actually switching to it.

Update Framework and Dependencies

# Update all flake inputs (decknix, nixpkgs, etc.)
decknix update

# Update a specific input
decknix update decknix

After updating, run decknix switch to apply.

Development Mode

Test local framework changes before pushing:

# Use your local decknix checkout
decknix switch --dev

# Or specify an explicit path
decknix switch --dev-path ~/projects/decknix

This passes --override-input decknix path:~/tools/decknix to darwin-rebuild.

Common Patterns

Edit Personal Config

$EDITOR ~/.config/decknix/local/home.nix
decknix switch

Add a New Package

# ~/.config/decknix/local/home.nix
{ pkgs, ... }: {
  home.packages = with pkgs; [
    kubectl
    helm
  ];
}
decknix switch

Disable a Module

# ~/.config/decknix/local/home.nix
{ ... }: {
  programs.emacs.decknix.welcome.enable = false;
  decknix.wm.aerospace.enable = false;
}
decknix switch

Troubleshooting

"command not found: decknix"

The CLI isn't in your path yet. Use the full command:

sudo darwin-rebuild switch --flake ~/.config/decknix#default --impure

Build Errors

Check the trace output to see which files were loaded:

[Loader] home + /Users/you/.config/decknix/local/home.nix
[Loader] system + /Users/you/.config/decknix/local/system.nix

Reset to Clean State

rm -rf ~/.config/decknix
# Re-run bootstrap or nix flake init