From 8d3731eeb3de2d102f44d2e477215a7a64774da2 Mon Sep 17 00:00:00 2001 From: Dennis Frieberg Date: Mon, 25 Sep 2023 15:00:15 +0200 Subject: [PATCH] added a comment regarding the use of `pkgs.nixos` --- nixos/flake-module.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nixos/flake-module.nix b/nixos/flake-module.nix index ef87e41..d82fbd4 100644 --- a/nixos/flake-module.nix +++ b/nixos/flake-module.nix @@ -2,6 +2,15 @@ # This automatically searches for nixos configs in ./machines/${name}/configuration.nix # and exposes them as outputs.nixosConfigurations.${name} +# + +# a comment regarding pkgs.nixos vs lib.nixosSystem +# while lib.nixosSystem is the usual enduser way to evaluate nixos configurations +# in flakes, pkgs.nixos sets the package set to the packages it comes from. +# This spares us tracking our potentiell overlays and own package additions, but just +# using the right package set to begin with. Using lib.nixosSystem from the flake we would +# need to specify that again. + { withSystem, lib, inputs, ... }: { flake = { nixosConfigurations = withSystem "x86_64-linux" ({ pkgs, ... }: