Go to file
Nathan van Doorn 072dbfe689 Update nixpkgs 2024-07-10 14:48:48 +00:00
README.md Add note about adding samba users to readme 2024-06-01 11:07:42 +00:00
flake.lock Update nixpkgs 2024-07-10 14:48:48 +00:00
flake.nix Get hledger to work 2024-06-29 05:54:54 +00:00

README.md

NixOS configuration for NAS server "chopper"

This repository is for development of the NixOS configuration of my NAS server.

Hardware

This is intended to run on a RockPro64 with two 40TB HDDs as storage and a 64GB MicroSD card as boot and OS.

Goals

Zeroth milestone

  • SSH daemon
  • User who can act as a local admin

First milestone

  • ZFS set up on the HDDs
  • Plex media server

Second milestone

  • Samba for easy file access from Windows
  • NFS for easy file access from Linux

Third milestone

  • Torrent client web control interface available over LAN
  • Torrent client downloads over VPN

Non-declarative things

You need to add accounts for the samba. It doesn't use the Linux passwords.

sudo smbpasswd -a $username

Building

To build the SD image:

# building the NixOS portions
nix build .#nixosConfigurations.chopper.config.system.build.sdImage
cp result/sd-image/*.zst . # note it will be write-protected
nix-shell -p zstd --run "unzstd *.zst"
sudo dd if=$(echo -n *img) of=/dev/sda status=progress bs=4096
# build uboot
nix-build '<nixpkgs>' --argstr system aarch64-linux -A ubootRockPro64 --out-link ubootRockPro64
sudo dd if=ubootRockPro64/idbloader.img of=/dev/sda conv=fsync,notrunc bs=512 seek=64
sudo dd if=ubootRockPro64/u-boot.itb of=/dev/sda conv=fsync,notrunc bs=512 seek=16384

Further instructions can be found on these pages:

NixOS Wiki/NixOS on ARM/PINE64 RockPro64 NixOS Wiki/NixOS on ARM/Installation Pine64/RockPro64/Installing Arch Linux ARM

Updating

From chopper:

sudo nixos-rebuild switch --flake .

Notes

Building boot thing

nix-build '<nixpkgs/nixos>' -A config.system.build.sdImage -I nixos-config=./sd-image.nix --argstr system aarch64-linux
cp result/sd-image/*.zst .
nix-shell -p zstd --run "unzstd *.zst"
sudo dd if=*.image of=/dev/sda status=progress bs=4096