My overengineered NixOS flake: Desktops, laptops, servers and everything
else that can run an OS. Monorepo for everything NixOS.
A high level overview of this monorepo, containing configurations for all of my machines that are running or have ran NixOS at some point in time.
- Shared Configurations - Reduces re-used boilerplate code by sharing modules and profiles across hosts.
- Fully Modular - Utilizes NixOS' module system to avoid hardcoding any of the options.
- All-in-one - Servers, desktops, laptops, virtual machines and anything you can think of. Managed in one place.
- Detached Homes - Home-manager configurations are able to be detached for non-NixOS usage
- Profiles - Provides serialized configuration sets for easily changing large portions of configurations with less options.
- Sane Defaults - The modules attempt to bring the most sane defaults, while providing overrides.
- Secrets Management - Manage secrets through Agenix.
- Flexible Modules - Both Home-manager and NixOS modules allow users to retrieve NixOS or home-manager configurations from anywhere.
- Extensive Configuration - Most desktop programs are configured out of the box and shared across hosts, with override options for per-host controls.
- Wayland First - Leaves Xorg in the past where it belongs. Everything is configured around Wayland, with Xorg only as a fallback.
- Opt-in Impermanence - On-demand ephemeral root using BTRFS rollbacks and Impermanence
- Encryption Ready - Supports and actively utilizes full disk encryption.
- Declarative Themes - Using my module options, profiles and wallpkgs, everything theming is handled inside the flake.
- Modularized Flake Design - With the help of flake-parts, the flake is fully modular.
- Tree-wide formatting - Format files in any language with the help of devshells and treefmt-nix.
- flake.nix Ground zero of my system configuration. Declaring entrypoints
- lib Personal library of functions and utilities
- docsThe documentation for my flake repository
- notes Notes from tedious or/and underdocumented processes I have gone through. More or less a blog
- cheatsheet Useful tips that are hard to memorize, but easy to write down
- flake/ Individual parts of my flake, powered by flake-parts
- modules modules provided by my flake for both internal and public use
- pkgs packages exported by my flake
- schemes home-baked flake schemas for upcoming flake schemas
- templates templates for initializing flakes. Provides some language-specific flakes
- args.nix initiate and configure nixpkgs locally
- deployments.nix host setup for deploy-rs, currently a work in progress
- treefmt.nix various language-specific configurations for treefmt
- homes my personalized Home-Manager configuration module
- hosts per-host configurations that contain machine specific instructions and setups
- modules modularized NixOS configurations
- core The core module that all systems depend on
- extra Extra modules that are rarely imported
- options Definitions of module options used by common modules
- meta Internal, read-only module that defines host capabilities based on other options
- device Hardware capabilities of the host
- system OS-wide configurations for generic software and firmware on system level
- theme Active theme configurations ranging from QT theme to shell colors
- usrEnv userspace exclusive configurations. E.g. lockscreen or package sets
- secrets Agenix secrets
My special thanks go to fufexan for convincing me to use NixOS and sticking around to answer my most stupid and deranged questions, as well as my atrocious abstractions.
And to sioodmy which my configuration is initially based on. The simplicity of his configuration flake allowed me to take a foothold in the Nix world.
Pretend I haven't credited those people (but I will, because they are equally awesome and I appreciate them)
n3oney - gerg-l (bald frog) - eclairevoyant - FrothyMarrow
I shamelessly stole from got inspired by those folks
sioodmy - fufexan - rxyhn - NobbZ - ViperML - spikespaz - hlissner - fortuneteller2k - Max Headroom
... and surely there are more, but I tend to forget.
Resource that helped shape and improve this configuation, or resources that I strongly recommend that you read.
- A list of Nix library functions and builtins
- Vinícius Müller's Blog
- Viper's Blog
- Solène's Blog
- ...my own "blog"?
Software that helped this configuration become what it is, or software I find interesting
Projects I have made to use in this repository, or otherwise cool software that are used in this repository that I would like to endorse.
- nyxpkgs - my personal package collection
- neovim-flake - highly modular neovim module for NixOS & Home-manager
- docr - my barebones static site generator, used to generate my blog
- schizofox - hardened Firefox configuration for the delusional and the paranoid
- arRPC flake
Additionally, take a look at my notes/blog for my notes on specific processes on NixOS.
This repository (except for anything in docs directory) is licensed under the GPL-3.0 license. The notes and documentation available in docs directory is licensed under the CC BY License.
If you are directly copying a section of my config, please include a copyright notice at the top of the file. It is not enforced, but would be appreciated.
Screeenshot last updated 2023-12-09