nixos-config/modules
2021-01-26 14:31:03 +01:00
..
accentor Deploy accentor via NixOS 2021-01-26 14:31:03 +01:00
default Basic configuration for new servers and start modularizing config 2020-12-01 19:23:28 +01:00
ssh Basic configuration for new servers and start modularizing config 2020-12-01 19:23:28 +01:00
sshd 🔒 Secret 🔒 2020-12-27 19:10:33 +01:00
tmux Rework common profile into module system 2020-12-05 13:44:29 +01:00
accentor.nix Deploy accentor via NixOS 2021-01-26 14:31:03 +01:00
bluetooth.nix Rework common profile into module system 2020-12-05 13:44:29 +01:00
default.nix Deploy accentor via NixOS 2021-01-26 14:31:03 +01:00
docker.nix Basic configuration for new servers and start modularizing config 2020-12-01 19:23:28 +01:00
eid.nix Rework common profile into module system 2020-12-05 13:44:29 +01:00
git.nix Basic configuration for new servers and start modularizing config 2020-12-01 19:23:28 +01:00
global-mailer.nix Rework common profile into module system 2020-12-05 13:44:29 +01:00
gomuks.nix gomuks in nixpkgs has integrated paths for libnotify and pulseaudio now 2021-01-17 11:17:12 +01:00
neovim.nix Rework common profile into module system 2020-12-05 13:44:29 +01:00
nginx.nix Basic configuration for new servers and start modularizing config 2020-12-01 19:23:28 +01:00
nix.nix Don't allow just any unfree software 2021-01-07 18:41:42 +01:00
ovh.nix Basic configuration for new servers and start modularizing config 2020-12-01 19:23:28 +01:00
README.md Add some instructions on how to set-up ZFS for use with the custom module 2020-05-23 10:46:18 +02:00
smartd.nix Rework common profile into module system 2020-12-05 13:44:29 +01:00
ssh.nix Basic configuration for new servers and start modularizing config 2020-12-01 19:23:28 +01:00
sshd.nix Basic configuration for new servers and start modularizing config 2020-12-01 19:23:28 +01:00
syncthing-server.nix Basic configuration for new servers and start modularizing config 2020-12-01 19:23:28 +01:00
teeworlds.nix Add some modules for game hosting 2020-12-24 10:41:40 +01:00
tmux.nix Rework common profile into module system 2020-12-05 13:44:29 +01:00
zeroad.nix 0ad build is fixed in nixpkgs 2021-01-20 22:29:22 +01:00
zfs.nix Fix rolling back to blank root snapshot on servers 2020-12-11 10:24:07 +01:00
zsh.nix Rework common profile into module system 2020-12-05 13:44:29 +01:00

Setting up ZFS

  1. Create three partitions:

    • Boot
    • Swap
    • ZFS

    For example:

    sgdisk -n 0:0:+512MiB -t 0:EF00 -c 0:boot $DISK
    sgdisk -n 0:0:+32GiB -t 0:8200 -c 0:swap $DISK
    sgdisk -n 0:0:0 -t 0:BF01 -c 0:ZFS $DISK
    
  2. Configure swap and boot as usual.

  3. Create ZPool:

    zpool create -O mountpoint=none -O encryption=aes-256-gcm -O keyformat=passphrase rpool $ZFS_PART
    

    Leave out -O encryption=aes-256-gcm -O keyformat=passphrase if you don't want to fully encrypt the ZFS partition.

  4. Create datasets:

    zfs create -o mountpoint=legacy rpool/local/root
    zfs snapshot rpool/local/root@blank
    zfs create -o mountpoint=legacy rpool/local/nix
    zfs set compression=lz4 rpool/local/nix
    zfs create -o mountpoint=legacy rpool/local/cache
    zfs set compression=lz4 rpool/local/cache
    zfs create -o mountpoint=legacy rpool/safe/data
    zfs set compression=lz4 rpool/local/data
    
  5. Mount datasets:

    mount -t zfs rpool/local/root /mnt
    mkdir /mnt/nix
    mount -t zfs rpool/local/nix /mnt/nix
    mkdir /mnt/boot
    mount $BOOT_PART /mnt/boot
    mkdir /mnt/cache
    mount -t zfs rpool/local/cache /mnt/cache
    mkdir /mnt/data
    mount -t zfs rpool/safe/data /mnt/data
    
  6. Configure Host ID

    Set networking.hostid in the nixos config to head -c 8 /etc/machine-id.