The configuration files for all my Nix systems
4

Configure Feed

Select the types of activity you want to include in your feed.

Nix 100.0%
120 1 0

Clone this repository

https://tangled.org/hanna.lol/flake https://tangled.org/did:plc:hqak3ymv7okbokkssydumsrq
git@knot.hanna.lol:hanna.lol/flake git@knot.hanna.lol:did:plc:hqak3ymv7okbokkssydumsrq

For self-hosted knots, clone URLs may differ based on your setup.



README.md

flake#

The configuration files for all of my personal Nix based systems.

Usage#

To setup a system with one of the hosts on the system use nixos-rebuild.

$ nixos-rebuild boot --flake $PWD#hostname

If you are on a darwin system however, you need to use darwin-rebuild.

$ darwin-rebuild switch --flake $PWD#hostname

Adding hosts and users#

To add a new host you will want to create a config in hosts and add it.

mkSystem "hostname" {
  user = "username";
  system = "x86_64-linux";
  profile = "nixos";
}

For users, simply add a configuration to the users directory, it uses hjem.

  • darwin.nix - the user configuration specifically for darwin systems.
  • nixos.nix - the user configuration specifically for nixos systems.

You can look at existing users and hosts to see how they are setup.

Structure#

My flake is structured in a way that is focused on being easy to maintain.

flake/
├── hosts/
│   └── <name>/
│       ├── system/
│       ├── services/
│       └── default.nix
├── lib/
│   └── mksystem.nix
├── users/
│   └── <name>/
│       ├── configs/
│       ├── darwin.nix
│       └── nixos.nix
├── flake.lock
└── flake.nix