Skip to content

Latest commit

 

History

101 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zeon's NixOS Config

This is my personal NixOS configuration and not meant for general consumption.

Features

  • Multiple NixOS configurations, including desktop and VM
  • Automatic ZFS snapshots with rotation
  • Tweaked ZFS for better I/O
  • Niri with noctalia v5 shell & greeter

How to Install

Run the following commands from a terminal on a NixOS live iso / from a tty on the minimal iso.

The following install script partitions the disk, sets up the necessary datasets and installs NixOS.

From a standard ISO,

sh <(curl -L https://raw.githubusercontent.com/TwistedZeon/dotfiles/main/install.sh)

Reboot

Creating Persist Snapshot to Restore

sudo zfs snapshot zroot/persist@persist-snapshot
sudo zfs send zroot/persist@persist-snapshot > SNAPSHOT_FILE_PATH

Restoring from Persist Snapshot

# the rename is needed for encrypted datasets, as -F doesn't work
sudo zfs receive -o mountpoint=legacy zroot/persist-new < SNAPSHOT_FILE_PATH
sudo zfs rename zroot/persist zroot/persist-old
sudo zfs rename zroot/persist-new zroot/persist

System Rescue

Run the following commands from a terminal on a NixOS live iso / from a tty on the minimal iso.

The following script optionally reformats the boot partition and / or /nix dataset, then reinstalls NixOS.

From a standard ISO,

sh <(curl -L https://raw.githubusercontent.com/TwistedZeon/dotfiles/main/recover.sh)

Adding a New Host

NOTE: This can be done all within the live iso with a git clone but it's easier to do it on a system with a development environment already setup.

Create a new directory in hosts/ with the new hostname, in the same format as the other hosts.

Boot into the live iso on the new system and run nixos-generate-config --no-filesystems --show-hardware-config.

Copy the output onto a pastebin or similar, replacing hosts/NEW_HOSTNAME/hardware.nix with the pastebin contents, preferably on the other system.

Push the updated config to git, then proceed with installation using the instructions from How to Install above.

About

My NixOS configuration.

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages