Skip to content
/ Koch Public

Latest commit

 

History

4,250 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Koch: my flaky NixOS config

images/Koch_curve.svg

Bootstrapping

Boot

  1. Put a bootable NixOS iso image on a USB flash drive, and boot from it

Pick one of these two:

Single host

  1. Prime the box
    sudo nix --experimental-features 'nix-command flakes' run github:panchoh/Koch#silicon
        

NixOS Anywhere

  1. Set a password for the ‘nixos’ user
    passwd # set it to ‘nixos’
        
  2. From a NixOS host
    nixos-anywhere --flake github:panchoh/Koch#silicon nixos@silicon # set PIN to ‘nixos’
        
  3. Dispose of the ephemeral NixOS Anywhere ssh key
    gpg-connect-agent 'keyinfo --list' /bye # get the keygrip of the offending one
    gpg-connect-agent 'DELETE_KEY <KEYGRIP>' /bye # さようなら
        

Final steps

  1. Manage your SSH key and then let Home Manager finish the setup
    run0 systemctl restart home-manager-pancho.service
        
  2. Optimise the storage just this once
    nix store optimise --verbose
        
  3. You are all set. Happy hacking!

Updating

Self

With nh

nh os switch --verbose --print-build-logs # or -vL

With nixos-rebuild

nixos-rebuild switch --elevate=run0 --diff --verbose --print-build-logs # or --diff -vL

Remote

With nh

nh os switch --target-host silicon --verbose --print-build-logs # or -vL

With nixos-rebuild

nixos-rebuild switch --elevate=run0 --no-reexec --target-host phosphorus --diff --verbose --print-build-logs # or --diff -vL

With deploy-rs

Single host

cdf; deploy .#silicon

A group of boxen

cdf; deploy --groups k8s

Garbage Collection

With nh

nh clean all --keep-one --optimise

With task

task pristine

About

A Nix flake ❄️ for configuring my boxen using NixOS, Home Manager, Disko, Stylix, and more. Now in dendritic-ish style!

Topics

Resources

Stars

10 stars

Watchers

3 watching

Forks

Used by

Contributors

Languages