- Nix 99%
- Shell <1%
== This repo has been superseded by ~sntx/hive ==
It can be considered archived. Use at your own risk.
sntx's NixOS Flake
Welcome to my flake! My system configurations equivalent of dotfiles.

Screenshot of the Desktop
Features #
- Strong module configuration seperation
- Support for sharing custom configuration between multiple users and systems
- disko + nixos-anywhere (automatic partitioning & remote installation of new systems)
- TMPFS as / + impermanence (managing persistent data)
- agenix (secret management)
- Nixos containers for sandboxing applications & services (using systemd-nspawn)
- stylix (system-wide theming)
Installation #
Prerequisites
This installation assumes some knowledge about installing new linux systems and nixos. If you've never installed a linux system via a tty or this is your first nixos system, then I recommend trying out one of this official installtions first.
Furthermore you should be used to working with nix modules and nix flakes.
There are a few frameworks that this flake heavily relies on, please ensure that you're familiar with these.
Clone the repo
git clone https://git.sr.ht/~sntx/flake
cd flake
Adapt the configuration
To adapt the configuration to your needs, you'll need to replace the parts specific to my personal configuration.
- Remove all systems from the
flake.nixfile and add your own - Remove all hardware configurations from
modules/hardwareand add your own - Remove all users from
modules/usersand add your own - Remove all agenix secrets from
.secretsand add your own
Make sure that all the changed files are being imported.
Push the changes to your repo
git remote set-url origin <your-repo>
git add .
git commit -m "Forked git.sr.ht/~sntx/flake and adapted configuration"
git push
Deploy the systems
./.scripts/install.sh <systemName> <address> [<disk-encryption-keyfile>]
Technical Overview #
This flake splits the aspects of my system configuration into different modules which in turn can be assigned to multiple system definitions.
The structure of the modules is as follwos:
system
A system is defined by it's hostName, hardware, pkgs-sys and users.
hardware
The hardware module for it's 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 activation based on user configuration.
profiles
A module that exposes modules to enable a set of pkgs-usr, pkgs-sys and nixpkgs-packages. In some cases profiles also provide configuration changes to improve the experience for the profile.
users
Contains user declarations, this allows for setting user configuration, default packages, profiles, pkgs-usr, impermanence and a theme.
themes
Modules defining stylix configurations to allow users to share themes, while having independent themes for each user.