Files
nix-config/modules/inputs.org
T
phundrak a2b21feacc refactor: change to litterate config
Configuration is now held by the `.org` files. All `.nix` files are
tangled from the org-mode files.
2026-10-04 22:34:28 +02:00

2.6 KiB
Raw Blame History

Flake File Setup

Flake File Setup

This configuration uses flake-file. This means my flake.nix file is modular, as it allows me to define my inputs where I need them, and not necessarily all at the same place. This can be a bit unusual for people who are new to it, but trust me, it’s well worth it.

I’ll simply set up the outputs, a single one named dendritic, and the description here, as nothing is too complicated.

{
  <<inputs>>
  flake-file.outputs = "dendritic";
  flake-file.description = "NixOS and Home Manager configuration of P'undrak";
}

Inputs

Some flake imputs are required globally, as they are used by default by this configuration and some hosts.

flake-file.inputs = {
  <<inputs-nixpkgs>>
  <<inputs-flake-parts>>
  <<inputs-flake-file>>
  <<inputs-import-tree>>
  <<inputs-home-manager>>
};

First, we get to nixpkgs, which is quite necessary to get NixOS up and running: it gives access to Nix’s packages. I also have a nixpkgsStable input for the kernel of my PineTab 2 tablet. Otherwise, I use Nix unstable.

nixpkgsStable.url = "nixpkgs/nixos-25.11";
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";

Next, I need some inputs for my dendritic config. flake-parts is the heart of it: it’s a framework for writing flake modules that can easily be put together as a single module defining an entire system, such as a home configuration or a host configuration.

flake-parts.url = "github:hercules-ci/flake-parts";

Next, we have flake-file, which permits the modularisation of my flake.nix file itself, as mentioned abve.

flake-file.url = "github:vic/flake-file";

Next, we have import-tree, which automatically imports my Nix files, making all modules globally known.

import-tree.url = "github:vic/import-tree";

And last but not least, home-manager. This allows me to manage the programs of me as the user of my machine and not necessarily the machine itself, as well as their configuration. As such, I can upgrade a machine’s system without touching my environment, and the inverse is true. However, it’s important to keep them in sync when it comes to major upgrades of NixOS, so home-manager will follow the system’s version.

home-manager = {
  url = "github:nix-community/home-manager";
  inputs.nixpkgs.follows = "nixpkgs";
};