My personal Nix configurations for managing multiple systems using NixOS and nix-darwin. This repository provides declarative configuration for workstations, servers, and network infrastructure.
This configuration manages:
- NixOS systems: Router (Banana Pi), NAS server (GMKtec G9), WSL
- macOS systems: Development workstation (MacBook Pro M1)
- User environments: Dotfiles and applications via Home Manager
- Network services: Nextcloud, Jellyfin, Grafana, Prometheus, Loki
- Network infrastructure: Router with VLANs, firewall, and monitoring
To use these configurations:
- Review the documentation for your target system in the Hosts or Homes section
- Define your users in
./usersfollowing the nix-configs module schema - Update
varsinflake.nixwith your admin user email - Configure secrets using
agenixfor passwords and sensitive data - Build and deploy using the commands specific to your host or home
Each host and home configuration has detailed installation instructions in its README.
These configurations make use of personal preferences. I have forked some tools and made personal edits which may make this unstable:
nix-darwin: I added additional user configuration management and fixed some multi-user issues in the system. This was done in a heavy-handed manner and so will likely not be supported upstream. This may change as upstream improves on these issues.agenix: Wanted to add armor output support for better git visibility. Also needed to fixageBinfor Darwin configuration.
- Banana Pi BPI-R3:
bpi- Router and network infrastructure - GMKtec G9:
lil-nas- NAS server with Nextcloud, Jellyfin, and monitoring - MacBook Pro M1:
laplace- macOS development workstation - WSL:
syringa- Windows Subsystem for Linux
Hosts import reusable system configuration modules based on the type of system being configured:
- Darwin:
./modules/darwin - Linux:
./modules/nixos
All hosts import the Home Manager module (./modules/home-manager). This module brings in reusable configurations to be applied for each defined user in a host.
Standalone home-manager configurations for systems not managed by NixOS or nix-darwin:
- Steam Deck:
companioncube- Portable gaming device - Android AVF:
debian- Android Virtualization Framework Linux terminal
Each home configuration has its own README with installation and usage instructions.
Reusable NixOS and nix-darwin modules provide the building blocks for host configurations:
darwin: macOS system configuration via nix-darwinhome-manager: User-level dotfiles and application configurationnix-configs: Common user definition schemanixos: NixOS system configurationnixvim: Neovim IDE configurationtopology: Network topology visualization
Each module has its own README with detailed documentation on its purpose and usage.
Users are defined in the ./users directory using the schema from the nix-configs module. The default configuration imports all users, but hosts can selectively import individual users as needed.
The admin user is specified in vars within flake.nix. You should modify this user if copying this repository.
Default passwords for users are set differently by platform:
- Darwin: Defaults to the user's configuration
name - NixOS: Set via
initialHashedPasswordorhashedPasswordFile
If mutableUsers is enabled in the host configuration, passwords may be changed from their initial values.
The users.shadow.enable option moves password management into individually managed $HOME/.shadow files using the nixos-passwd script from the nixos-password package. When a /persist mount is enabled, shadow files are created in /persist/$HOME/.shadow for each managed user.
Development environment templates are available for quick project setup. Initialize a new project with:
nix flake init --template github:dlubawy/nix-configs/main#[template]Available templates: deno, go, latex, nix, python, rust, tofu, and empty.