Collaborative NixOS System Configuration
README.md

Apiary apiary status

Collaborative NixOS System Configuration


The Apiary flake is a collaborative system configuration for NixOS, which allows multiple users to work together on maintaining their system configurations. This flake divides the aspects of the system configuration into different modules that can be shared among users or assigned to various system definitions.

Features #

  • Modular structure for easy management and sharing of system configurations
  • Supports multiple users with separate profiles and user-specific configurations
  • Wrapping for NixOS modules and packages, allowing for customization and optimization
  • Themes module for shared styling across users while maintaining individual preferences

Usage #

To use Apiary, follow these steps:

  1. Clone the repository to your local machine.

    nix flake init -t sourcehut:~sntx/apiary
    
  2. Make any necessary adjustments to the system configuration.

  3. Build and activate the desired system configuration.

    nixos-rebuild switch --flake .#template-system
    
  4. Optionally, create a new branch for your changes and submit a pull request if you want to contribute to the project.

Technical Overview #

This flake splits system configuration into different modules which in turn can be assigned to multiple system definitions. The structure of the modules is as follows:

system

A system is defined by:

  • networking.hostName (the hardware module for the system is implicitly activated by the hostName)
  • pkgs-sys
  • users
hardware

The hardware module for a system is activated based on the configured hostName. It contains all system specific configuration, such as the bootloader, kernelModules, disko configuration, hardware services like fstrim, hardware.systemType, system.stateVersion and timeZone.

pkgs-sys

Contains wrapping for system-wide NixOS modules configuration.

pkgs-usr

Contains wrapping for NixOS modules configuration, with user based activation.

profiles

A module that exposes modules to enable a set of pkgs-usr, pkgs-sys and nixpkgs-packages. In some cases profiles provide configuration changes to improve the experience of the profile.

users

Contains user declarations:

  • config
  • default packages
  • profiles
  • pkgs-usr
  • extraPackages
  • impermanence
  • theme
themes

themes is a modules defining stylix configurations.