My current NixOS (and constant changing) configuration
Note: There are upcoming changes being actively made so documentation will change and may not necessarily be update to date!
- Multiple NixOS configurations, including laptop and desktop
- Install and partitioning commands via just
- Declarative partitioning with disko.
- Flexible NixOS/Home Manager with module options**, easily toggle options with
modules.OPTION.enable
- Automatically append users to multiple hosts along with specific user settings for each user
- Modular configuration, easily add new users and machines
- Wayland/X11 Setups
- Multiple fully featured desktop environments (KDE Plasma 6)
- Live image ISO build with Nvidia drivers, experimental nix features already enabled, unfree software usage, and some nice options for cli and emacs
- Declarative themes with theme module and stylix
- Deployment of secrets using agenix (with yubikey) and evaluation secrets with git-crypt
- Includes pre-commit scripts to make sure flake is correctly setup and ready to be published to a git repository
- Runarsf’s dotfiles and imatpot’s dotfiles - Custom library and inspiration for more traditional flake layout
- Llakala’s nixos config - Additional libraries for home-manager cli integration and inspiration for integrating more HM stuff into the NixOS-specific configs
- Mistero77’s nix-config and nix starter configs - Original inspiration for flake, now mostly using some opinionated settings and overlay/devshell setup
- Hlissner’s dotfiles - Security hardening configs
- Baitinq’s nixos-config - Partitioning scripts
- Theopn’s and yutkat’s dotfiles - Wezterm settings
- Getchoo’s flake - Nvidia settings
- sagikazarmark’s nix-config - Structure of host configurations
- archer-65’s nix-dotfiles - Structure of host configurations
- lgug2z Handling Secrets in NixOS Blogpost - Git-crypt implementation for secrets required during flake evaluation
- Lillian-Violet’s NixOS-Configuration - some ISO/live-image settings
- EmergentMind’s nix-config - just file integration and helpful secret tips
- x0ba’s dotfiles - Agenix NixOS/Home-Manager setup with Yubikey-support
- Kranzes’ nix-config - Agenix formatting
- Babeuh’s nix-config - Yubikey secrets setup with age (most importantly, pcsd service startup during boot process)
- sickle-phin’s dots-nix - Extra Nvidia environment variables
Here’s an overview of the repo’s file structure (Generated with eza --icons=never --tree
):
./ ├── documentation/ ├── hosts/ │ ├── live-image/ │ │ └── configuration.nix │ ├── ryzennova/ │ │ ├── configuration.nix │ │ ├── disks.nix │ │ ├── hardware-configuration.nix │ └── yoganova/ │ ├── configuration.nix │ ├── disks.nix │ ├── hardware-configuration.nix ├── lib/ ├── modules/ │ ├── home-manager/ │ │ ├── default-config.nix │ │ ├── shared.nix │ │ ├── submodule.nix │ │ └── system-config-support.nix │ ├── linux/ │ │ ├── core/ │ │ ├── graphical/ │ │ ├── hardware/ │ │ ├── locales/ │ │ ├── services/ │ │ ├── default-config.nix │ │ ├── user-nixos-configs.nix │ ├── nix/ │ │ ├── legacy-consistency.nix │ │ ├── nix-config.nix │ │ ├── nix.nix │ │ ├── nixpkgs-config.nix │ │ └── nixpkgs.nix │ └── users/ │ ├── desktop/ │ │ ├── displayManager/ │ ├── development/ │ ├── doom-emacs/ │ ├── gaming/ │ ├── gpg/ │ ├── theme/ ├── overlays/ ├── pkgs/ ├── scripts/ ├── secrets/ │ ├── identities/ │ └── secrets.nix ├── users/ │ ├── nixos/ │ │ ├── config/ │ │ └── default.nix │ └── novaviper/ │ ├── config/ │ ├── dotfiles/ │ └── default.nix ├── flake.lock ├── flake.nix ├── justfile ├── README.org └── shell.nix
flake.nix
: Entrypoint for host and home configurations. Also exposes a devshell for boostrapping the system (nix develop
ornix shell
).lib
: Custom library functions for various parts of the flake, imported into HomeManager and NixOShosts
: Configurations for each machine, accessible vianixos-rebuild --flake
.ryzennova
: Primary PC - 32GB RAM, Ryzen 5600G, RTX 2060 6GB | KDE Plasma 6yoganova
: Lenovo Yoga 7i 16IRL8 (Type 82YN) - 8GB RAM, Intel i5 1335U | KDE Plasma 6live-image
: ISO configuration | Nvidia drivers included | KDE Plasma 6
users
: Configurations for each user, includes both host OS specific (NixOS or Darwin) and Home Manager configurations. Built together with thehosts
configurations vianixos-rebuild --flake
(or the darwin equivalent)modules
: Modules for various configuration definitions, all settings are defined herehome-manager
: Base configurations for Home-Manager, contains default configurations and helper modules that help setup the flake.linux
: Configurations applied to Linux based systems, contains default configurations and helper modules that help setup the flake.core
: Configurations applied across all hostslocales
: Language configurations
nix
: Base configurations for the Nix package managerusers
: Configurations imported as modules for the user to toggle viamodules.OPTION.enable
overlay
: Patches and version overrides for some packages, applied to all systems and even the devshell. Accessible vianix build
.pkgs
: Custom nix packages defined similarly to nixpkg ones. Also accessible vianix build
. You can compose these into your own configuration by using my flake’s overlay, or consume them through NUR.secrets
: All user/host age secrets are located herescripts
: Bash/Posix scripts needed for variousprecommit
andjust
commandsjustfile
: Command recipe file forjust
, contains various helpful commands for the flakeshell.nix
: Declaration of nix-shell, used fornix-shell
andnix develop
For installation, check out the installation guide located under documentation/installation.org! Check out documentation/tips.org for some tips and important information regarding how the entire flake works.
Main user relevant apps
- kde plasma 6
- doom emacs
- zsh + atuin + fzf + powerlevel10k
- floorp
- keepassxc/pass
- gpg + ssh-agent + yubikey
- tailscale
- kdeconnect
- krita
- libreoffice
- jellyfin (feishin)
- rio + tmux
- and quite a bit more…
Nix stuff
- home-manager
- NixOS and nix, of course
I designed my NixOS flake to be modular and customizable; so feel free to change it up and use it in your own setups!