Skip to content

Stupremee/nix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1813c12 · Oct 2, 2024
Aug 29, 2024
Sep 7, 2024
Sep 17, 2024
Jul 25, 2024
Sep 7, 2024
Oct 2, 2024
Dec 13, 2023
Aug 18, 2021
Oct 9, 2022
Jan 7, 2021
Aug 13, 2020
Jun 7, 2022
Aug 29, 2024
Aug 29, 2024
Apr 26, 2024
May 19, 2022
Apr 5, 2023
Feb 22, 2023

Repository files navigation

NixOS configuration

Installation

Install on Hetzner Cloud

# Hetzner Cloud OS images grow the root partition to the size of the local
# disk on first boot. In case the NixOS live ISO is booted immediately on
# first powerup, that does not happen. Thus we need to grow the partition
# by deleting and re-creating it.
sgdisk -d 1 /dev/sda
sgdisk -N 1 /dev/sda
partprobe /dev/sda

# Setup ZFS pools and datasets
zpool destroy -f rpool || true
zpool create -f rpool /dev/sda1

# Dataset for `/`
zfs create -p -o mountpoint=legacy rpool/local/root
zfs snapshot rpool/local/root@blank
mount -t zfs rpool/local/root /mnt

# Dataset for `/nix`
zfs create -p -o mountpoint=legacy rpool/local/nix
mkdir /mnt/nix
mount -t zfs rpool/local/nix /mnt/nix

# Dataset for `/boot`
zfs create -p -o mountpoint=legacy rpool/local/boot
mkdir /mnt/boot
mount -t zfs rpool/local/boot /mnt/boot

# Dataset for `/home`
zfs create -p -o mountpoint=legacy rpool/safe/home
mkdir /mnt/home
mount -t zfs rpool/safe/home /mnt/home

# Dataset for persistent state
zfs create -p -o mountpoint=legacy rpool/safe/persist
mkdir /mnt/persist
mount -t zfs rpool/safe/persist /mnt/persist


# Important, otherwise `sshd` wont be able to start on first boot
mkdir -p /mnt/persist/etc/ssh

About

My NixOs dotfiles for my machines

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages