Hi! This repo contains NixOS and Home Manager configurations for all my machines. Be warned that it's not intended to be used directly by anyone other than me and likely wouldn't work if you tried. However, please feel free to look around, learn, and copy as much as you want. Happy nixing!
- Declarative disk partitioning with disko.
- LUKS full disk encryption and auto unlocking with TPM.
- Secure Boot with Lanzaboote.
- BTRFS with home directory snapshots.
- Secrets provisioning with sops-nix. The secrets are stored in a separate, private repo.
- The entire configuration is modularized and exported from the flake. This allows using selected (or all) parts in other flakes.
- Semi-automated installation.
Visible: hyprland, waybar, alacritty, neovim, neofetch, eza. | |
Visible: hyprland, waybar, alacritty, figlet, lolcat, swaync. | Visible: hyprland, waybar, firefox, alacritty, btop. |
hosts
- Configurations for specific machines.<hostname>
common
- Configurations used by both NixOS and Home Manager.user.nix
- Definitions of options containing my user account details. Those are imported by both NixOS and Home Manager. This way the values are accessible both for home and system configurations and always in sync.
home-manager
bazyli.nix
- Definitions of Home Manager options. I'm mostly defining custom options declared inmodules
.
nixos
disks.nix
- Disks, partitions and filesystems defined usingdisko
.hardware-configuration.nix
- Generated hardware configuration for the machine.configuration.nix
- Definitions of NixOS options. I'm mostly defining custom options declared inmodules
.*.nix
- More definitions of NixOS options which are distinct enough to be extracted fromconfiguration.nix
.
lib
- Custom helpers, used in many places or generic enough to be extracted here.modules
- Modules containing declarations of all my custom options.common
- Declarations of options imported by both NixOS and Home Manager. Seehosts/<hostname>/common
for those options' definitions.home-manager
configurations
- Modules with configurations not directly related to specific programs.options
- Modules containing only options' declarations. Those modules do not contain theconfig
section at all. The values of those options are consumed by other modules.presets
- Modules defining presets which enable a bunch of options declared in other modules at once. E.g.cli
,desktop
,hyprland
.programs
- Modules with configurations related to specific programs. Usually each module configures a single program.
nixos
configurations
- Same as inhome-manager
.options
- Same as inhome-manager
.presets
- Same as inhome-manager
.programs
- Same as inhome-manager
.services
- Modules with configurations related to services. For me a "service" is a program which servers something to different machines so those modules are used almost exclusively on servers. Note that it's a different definition of a "service" than whatnixpgs
modules use.
overlays
- Custom overlays modifyingnixpkgs
. I barely use this.pkgs
- Custom packages. Those might be my personal scripts / programs, packages I found on the internet which are not innixpkgs
, or packages I intend to upstream intonixpkgs
.flake.nix
- Flake entrypoint. Exposes all the modules and configurations defined in the flake and allows them to be imported by other flakes.
See the Installation instruction.
I used this to learn about NixOS and might have copied some stuff from there.