Skip to content

Latest commit

 

History

History
164 lines (151 loc) · 8.89 KB

README.org

File metadata and controls

164 lines (151 loc) · 8.89 KB

My NixOS Configurations

https://img.shields.io/badge/Built_with_Nix-white.svg?style=for-the-badge&logo=nixos&logoColor=white&color=41439a&test.svg https://img.shields.io/badge/Codeberg-white.svg?style=for-the-badge&logo=codeberg&logoColor=white&color=2185D0&test.svg https://img.shields.io/badge/Github-white.svg?style=for-the-badge&logo=github&logoColor=white&color=121011&test.svg https://img.shields.io/badge/GitLab-330F63?style=for-the-badge&logo=gitlab&logoColor=white&test.svg

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!

Table of Contents

Highlights

  • 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

References

Structure

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 or nix shell).
  • lib: Custom library functions for various parts of the flake, imported into HomeManager and NixOS
  • hosts: Configurations for each machine, accessible via nixos-rebuild --flake.
    • ryzennova: Primary PC - 32GB RAM, Ryzen 5600G, RTX 2060 6GB | KDE Plasma 6
    • yoganova: Lenovo Yoga 7i 16IRL8 (Type 82YN) - 8GB RAM, Intel i5 1335U | KDE Plasma 6
    • live-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 the hosts configurations via nixos-rebuild --flake (or the darwin equivalent)
  • modules: Modules for various configuration definitions, all settings are defined here
    • home-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 hosts
      • locales: Language configurations
    • nix: Base configurations for the Nix package manager
    • users: Configurations imported as modules for the user to toggle via modules.OPTION.enable
  • overlay: Patches and version overrides for some packages, applied to all systems and even the devshell. Accessible via nix build.
  • pkgs: Custom nix packages defined similarly to nixpkg ones. Also accessible via nix 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 here
  • scripts: Bash/Posix scripts needed for various precommit and just commands
  • justfile: Command recipe file for just, contains various helpful commands for the flake
  • shell.nix: Declaration of nix-shell, used for nix-shell and nix develop

Installation/Usage

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.

Tooling and Applications I Use

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

Final Note

I designed my NixOS flake to be modular and customizable; so feel free to change it up and use it in your own setups!