.git-crypt | ||
resources/gitea-custom | ||
secrets | ||
services | ||
.gitattributes | ||
.gitignore | ||
build-vm.sh | ||
flake.lock | ||
flake.nix | ||
host.nix | ||
lib.nix | ||
readme.md | ||
update-blog.sh |
NixOS server
This is my homeserver running NixOS. It makes heavy use of containers in order to organize processes.
Containers
The file host.nix
has a whole load of code which
basically allows one to specify services in the service/
directiory, which are then ran in seperate NixOS containers.
Disk setup
- root filesystem
- The root FS is on a 128GB SATA SSD running EXT4. (also used for vfat boot partiotion)
- Nothing fancy, just reliable and slightly faster root.
- container storage
- The container storage is a ZFS pool
- Its running on a mirror configuration with 1TB disk pairs (currently one pair)
- It has a blocksize of 1M to accomodate serving large media files (FLAC music, 4K movies, series, etc). This is deemed more important than DB performance in this application
- It is compressed using ZFS standard LZ4 compression to save space
- A 7 day window of snapshots are kept on the drive
- A lot of inspiration where taken from the following sources
- backups
- Backups are made to a second pool on an external drive
- All snapshots are sent over to this drive, and they are not deleted
- It runs slower GZ based compression to minimize space taken
- TODO: what do I do when this is full?