This repository contains the NixOS configurations for multiple systems.
- harmony: Home server with media services, Minecraft servers, and more
- melaan: Framework laptop running GNOME desktop
The configuration is organized into modular components for better maintainability. See docs/MODULE-ORGANIZATION.md for detailed documentation on the module structure.
flake.nix: Main flake configuration defining inputs and outputssystems/: System-specific configuration directoriesharmony/: Configuration files for the harmony serverconfiguration.nix: Top-level configuration that imports all moduleshardware-configuration.nix: Hardware-specific configuration (auto-generated)
melaan/: Configuration files for the melaan laptopconfiguration.nix: GNOME desktop and user configurationhardware-configuration.nix: Framework-specific hardware configuration
homes/: Home Manager configurationsoscar.nix: Oscar's home-manager configurationadelline.nix: Adelline's home-manager configuration
cachix.nix: Binary cache configurationmodules/: Modular configuration organized by functionality (used by harmony):autobrr.nix: Autobrr service and nginx configboot.nix: Boot loader configurationcross-seed.nix: Cross-seed servicegluetun.nix: VPN containerhomepage.nix: Homepage dashboard and nginx configminecraft.nix: Minecraft server configurationsnetworking.nix: Network settings and firewall rulesnginx.nix: Base nginx settings and ACME configurationnixpkgs.nix: Nixpkgs overlays and package settingsplex.nix: Plex service and nginx configprofilarr.nix: Profilarr container and nginx configprowlarr.nix: Prowlarr and Flaresolverr services with nginx configqbittorrent.nix: qBittorrent container, user/group, and nginx configradarr.nix: Radarr service and nginx configsamba.nix: File sharing configurationsecrets.nix: Agenix secret definitionsservices.nix: Miscellaneous system servicessonarr.nix: Sonarr service and nginx configsystem.nix: Core system settings, programs, and system packagesunpackerr.nix: Unpackerr containerusers.nix: User account definitions (shared across systems)zfs.nix: ZFS filesystem and services configuration
This configuration includes development tools integrated with git-hooks.nix for automatic checks on commit:
- Alejandra: An opinionated Nix code formatter
- flake-checker: A tool to check flake health
- statix: A linter for Nix code
- Prettier: A code formatter for JSON, Markdown, and YAML files
To enable automatic checks and formatting on commit:
nix developThis will set up the pre-commit hooks. After this, whenever you commit changes:
- Alejandra will automatically format Nix files
- flake-checker will verify flake health
- statix will lint Nix code for common issues
- Prettier will format JSON, Markdown, and YAML files
To manually format all Nix files in the repository:
nix fmtOr to format specific files:
nix fmt path/to/file.nixTo run all configured checks (including pre-commit hooks):
nix flake checkTo automatically fix statix issues:
nix run nixpkgs#statix -- fixGitHub Actions automatically run on all pull requests and pushes to main/master branches to ensure:
- Code is properly formatted (via Alejandra and Prettier)
- Nix code follows best practices (via statix)
- Flake configuration is healthy (via flake-checker)
This provides a safety net in case local pre-commit hooks are bypassed.
This repository uses Renovate Bot to automatically check for updates to Docker image versions used in OCI containers.
Renovate runs daily at midnight UTC and will automatically create pull requests when updates are available. The configuration is in renovate.json and includes:
- Custom regex matching to detect Docker images in
.nixfiles
Docker images are pinned to specific versions for reproducibility and stability.
To enable Renovate, you need to create a RENOVATE_TOKEN secret in your repository settings:
- Go to your repository's Settings → Secrets and variables → Actions
- Click New repository secret
- Name:
RENOVATE_TOKEN - Value: A GitHub Personal Access Token (PAT) with the following permissions:
reposcope (for private repositories) orpublic_reposcope (for public repositories)workflowscope (if you want Renovate to update GitHub Actions workflows)
To create a PAT:
- Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
- Click Generate new token → Generate new token (classic)
- Select the required scopes mentioned above
- Copy the token and add it as the
RENOVATE_TOKENsecret
Build and switch to a configuration:
# For harmony server
sudo nixos-rebuild switch --flake .#harmony
# For melaan laptop
sudo nixos-rebuild switch --flake .#melaan