my server nixos configuration
Find a file
2025-04-15 12:06:41 +02:00
modules bunch of stuff 2025-04-01 15:50:31 +02:00
secrets bunch of stuff 2025-04-01 15:50:31 +02:00
services removed redundant files 2025-04-15 12:06:41 +02:00
.README.md.swp updated readme 2025-04-15 11:50:17 +02:00
configuration.nix conduit not working 2025-03-31 00:50:17 +02:00
disko.nix added more comments to disko config 2025-04-15 11:30:05 +02:00
flake.lock updated flake.lock 2025-03-30 21:54:52 +02:00
flake.nix Updated system 2025-03-19 18:18:43 +01:00
hardware-configuration.nix Added vault warden 2025-03-03 12:36:42 +01:00
home.nix its working 2025-03-03 22:25:44 +01:00
password.nix Made nix store accessible to wheel users 2025-03-03 12:32:29 +01:00
README.md updated readme 2025-04-15 11:50:17 +02:00
vm-hardware-configuration.nix Made nix store accessible to wheel users 2025-03-03 12:32:29 +01:00

Server nixos configuration

This is the configuration running on my homebrew server. It is perfect in and no other config is in any way shape or form better.

Features

  • Forgejo git instance
  • Vaultwarden password manager
  • Jellyfin media server
  • Sonnar, Radarr, Jackett and transmission auto-torrenting setup in declarative astro/microvm virtual machine behind a VPN.
  • ZFS RaidZ (Raid5) for data resilience with automated emails for failed drives
  • Self-hosted mail server for sending emails
  • Simple file structure for easy extension

How to Install

Prepare device

Install the nixos boot ISO and run it on your device. Once booted run

$ sudo passwd
$ ip a

to set a password for the nix user and display your ip. Once done you can ssh into the device and generate a nix hardware config with

$ ssh nix@<ip>
$ sudo mkdir /mnt
$ sudo nixos-generate-config --root /mnt --no-filesystem

This will generate the file /mnt/hardware-config.nix that you can then copy to your computer.

Install configuration

Prepare repo

  1. Clone the repo
  • git clone https://git.spoodythe.one/spoody/server-configuration.git
  1. Copy the hardware-configuration.nix from your device to the repo folder.
  • scp nix@<ip>:/mnt/hardware-configuration.nix /path/to/repo/hardware-configuration.nix
  1. Add/change the device configuration in flake.nix
  • This includes configuring which (if any) disks should be included in the raid array, as well as which disk is the main root disk.

Install remotely

Run the command

nix run github:nix-community/nixos-anywhere -- --flake '.#<your configuration>' --target-host nixos@<ip>

This will automatically install the configuration to your server.

Copy configuration to server

Once the configuration has been installed push your modified repo to a git service and pull it on the server.