Skip to content

oddib/nixos-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nixos config

Some annoying commands to type when reinstalling systems

Creating Iso file and imaging

Generate Iso:

nix build .#nixosConfigurations.iso.config.system.build.isoImage
sudo dd if=result/iso/*.iso of=/dev/sdX status=progress

/dev/sdX is the install media

Get ready for install:

Run:

cd /tmp

root=$(mktemp -d)

mkpasswd PASSWORD > ${root}/etc/passwords/oddbjornmr

only needed for secure boot

sudo nix run nixpkgs#sbctl create-keys -e ${root}/var/lib/sbctl

Run nixos anywhere:

nix run github:nix-community/nixos-anywhere -- \
--flake .#gobel \
--target-host user@host

Post install

Secure boot:

  • To verify signing run:
sudo nix run unstable#sbctl verify
  • Enroll keys:
sudo nix run nixpkgs#sbctl enroll-keys -- --microsoft

Reboot and verify

bootctl status

If all is good enroll luks keys

sudo systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0+2+7+12 --wipe-slot=tpm2 /dev/nvme0n1p2

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages