2026-03-10 22:49:38 -05:00
2026-02-16 09:14:16 -06:00
2026-03-10 22:49:38 -05:00
2026-03-08 15:33:30 -05:00
2026-03-09 00:25:41 -05:00
2026-02-16 09:14:16 -06:00
2026-03-08 23:41:08 -05:00
2026-03-08 21:55:01 -05:00
2026-03-09 00:25:41 -05:00

A Dendritic Nix Flake

Regenerate flake and switch to it.

nix run .#write-flake
nix flake check
home-manager switch --flake .#desktop
nix flake show --all-systems

Layout

  • Everything under ./modules gets auto-imported by import-tree

Mechanics

Flake

The top-level flake is created using flake-file

nix flake init -t github:vic/flake-file#default
...
nix run ".#write-flake"

This uses inputs.flake-parts.lib.mkFlake to create the flake.

The modules are automatically imported from the ./modules using import-tree.

Home Manager

Uses the home-manager module of flake-parts, which is imported in modules/home-manager/flake-parts.nix

Looks for options:

  • flake.homeConfigurations
  • flake.homeModules

Show exported home configurations:

nix eval --apply builtins.attrNames .#homeConfigurations

Testing

These commands would are useful for debugging

SYSTEM=lxc

# Just evaluate (fast, catches config errors)
nix eval .#nixosConfigurations.${SYSTEM}.config.system.build.toplevel

# Full build (slower, produces a bootable system)
nix build .#nixosConfigurations.${SYSTEM}.config.system.build.toplevel

Remote Deploy

nixos-rebuild switch --flake .#lxc --target-host root@fded:fb16:653e:25da:be24:11ff:fea0:753f
Description
No description provided
Readme 317 KiB
Languages
Nix 97.4%
Shell 2.6%