establish flakeArg construct & add docu

main
Felix Stupp 2 months ago
parent c27e5818c0
commit 91c72a02db
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -42,8 +42,17 @@
{ self, ... }@inputs: { self, ... }@inputs:
let let
inherit (self) outputs; inherit (self) outputs;
# every flake "submodule" gets this passed:
flakeArg = { flakeArg = {
inherit self inputs outputs; # Usage in submodule:
# { ... }@flakeArg: { }
# add "..." this so new ones can easily be added
inherit
# flake refs
self # reflection
inputs # evaluated inputs
outputs # evaluated outputs
;
}; };
# constants # constants
system = "x86_64-linux"; system = "x86_64-linux";

@ -1,3 +1,5 @@
# nix configs & modules
This directory contains all nix-related (esp. NixOS) files. This directory contains all nix-related (esp. NixOS) files.
Normally, I would have placed these directories on the same level as flake.nix, but: Normally, I would have placed these directories on the same level as flake.nix, but:
@ -7,3 +9,8 @@ Normally, I would have placed these directories on the same level as flake.nix,
(i.e. also including systems without NixOS) (i.e. also including systems without NixOS)
it also contains files for different systems. it also contains files for different systems.
These should be separated from nix files, in general. These should be separated from nix files, in general.
## flakeArg
Every flake "submodule" gets passed a `flakeArg` parameter to access the flakes inputs & outputs and other goodies. This is documented in ../flake.nix.

Loading…
Cancel
Save