Use `nh os switch` instead of `nixos-rebuild switch` in rebuild script

finchie
Mar 30, 2024, 1:07 AM
DQWC7X43PNLIKKFSOCRM3V46ZK3AHPQ2TFGGHK7ASKPDWCVWCLMAC

Dependencies

  • [2] 5FI47NSA Migrate to home-manager
  • [3] PU57TJQJ Fix topgrade by spawning with `nix-shell --run`
  • [4] 6I2HQYU2 Add basic flake configuration
  • [5] HINOSPQO Add simple nushell update script
  • [6] BAT5B53O Refuse to rebuild until repository has no unrecorded changes

Change contents

  • replacement in update.nu at line 32
    [4.875][3.0:20](),[3.20][4.893:943](),[4.893][4.893:943]()
    # nix flake update;
    sudo nixos-rebuild switch --upgrade-all --impure;
    [4.875]
    [4.943]
    # Update all channels beforehand
    sudo nix-channel --update;
    # Using `nh` (https://github.com/viperML/nh), which integrates:
    # - `nix-output-monitor` (https://github.com/maralorn/nix-output-monitor)
    # - `nvd` (https://gitlab.com/khumba/nvd)
    nh os switch . -- --impure;
  • edit in home.nix at line 110
    [2.1847]
    [2.1847]
    nix-output-monitor
    nh
  • replacement in .ignore at line 3
    [4.10814][4.10814:10824]()
    flake.lock
    [4.10814]
    flake.lock
    result