reorganisation

This commit is contained in:
2026-11-07 11:47:46 +00:00
parent aa20bae49c
commit 4d999a7b2a
13 changed files with 37 additions and 28 deletions

View File

@@ -0,0 +1,23 @@
{inputs, ...}: {
# PerSystem, allows for universal module access
perSystem = {system, ...}: {
# Pre-defined object
_module.args = {
# Custom object, creating a new nixpkgs from a different input
unstablePkgs = import inputs.nixpkgs-unstable {
inherit system;
};
# Another example not in the video, creating an unfree instance of nixpkgs
# Setting nixpkgs.config.free = true isn't possible through a normal nixosModule,
# because of how inheritance works with nixos exclusive objects
unfreePkgs = import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
};
# You can also set universal variables here, if you need to access the same info across files
someVariable = "import this as you would import pkgs, in a perSystem block";
};
};
}