This is my personal Nix flake for NixOS, Home-Manager and related services. It currently serves one user (myself, August Deer) and one machine, but more machines are planned to be added in the future.
- Wayland shell with Hyprland and Noctalia.
- Custom Neovim configuration.
- Various cli utilities: bat, yazi, eza, etc.
- Everything else I use on a day-to-day basis.
I primarily use the nh Nix CLI helper for
deployment. If nh is not installed, bring it into the environment with one of
the following commands:
nix shell nixpkgs#nh # with flakes
nix-shell -p nh # without flakesDeploy the os configuration with one of the following commands:
nh os switch # build and activate the current NixOS configuration
nh os boot # build current NixOS configuration and prepare for rebootThis is a nix flake, so inputs are pinned and not updated by default. To update
nixpkgs and other inputs, include the --update flag. Also include
--commit-lock-file to commit the updated inputs.
Caution
Nix ignores files which are untracked by git. git add any new files before
rebuilding.
assets/: Non-nix assets.flakeModules/: flake-parts modules for wiring up flake outputs.homeModules/: User configuration via Home-Manager. Imported as a NixOS module, so not necessary to use directly.hosts/: Device-specific system configuration. Each host is auto-imported fromhosts/<hostname>/default.nix. (Currently, all hosts are assumed to be of typex86_64-linux.)nixosModules/: Reusable system modules. Auto-imported into each NixOS configuration.packages/: Custom packages not currently in upstream nixpkgs. Packages are auto-imported and reexported asflake.packages.<system>.<name>. Single-file packages are imported frompackages/<name>.nix, multi-file packages (none at the moment) are imported frompackages/<name>/package.nix.
Create a new default configuration with this command:
nixos-generate-config --dir ./hosts/<hostname>/ --no-filesystemsThis will create a default configuration.nix and hardware-configuration.nix.
Rename configuration.nix to default.nix so it is imported correctly, and
make any desired changes.
This repo uses disko for managing
partitions and filesystems. Reference an existing disko.nix, or a file from
the disko
examples folder,
while configuring.
Note that most settings in configuration.nix can be deleted: the hostname is
automatically set based on the folder name, and sensible defaults are
automatically set by ./nixosModules/common.nix. Set
my.desktop.enable = true; for gui-specific tools.
Note
Remember to git add all new files, and commit + push your changes.
Finally, deploy the configuration with
sudo nix run 'github:nix-community/disko/latest#disko-install' -- \
--flake .#<hostname> \
--disk <disk-name> <disk-device>and reboot to enjoy your new NixOS install.
Portions of this configuration were written with LLM assistance (primarily via the pi agent). At all points, the goal is my own education. No code has been committed which I myself do not understand and cannot explain.
All documentation (including this README) is human-written.