nixosModules.pkgsReadOnly: init

This commit is contained in:
Robert Hensing 2023-05-07 15:37:28 +02:00
parent 693e2c3287
commit e5db80ae48
3 changed files with 146 additions and 0 deletions

View file

@ -57,6 +57,19 @@
nixosModules = {
notDetected = ./nixos/modules/installer/scan/not-detected.nix;
/*
Make the `nixpkgs.*` configuration read-only. Guarantees that `pkgs`
is the way you initialize it.
Example:
{
imports = [ nixpkgs.nixosModules.readOnlyPkgs ];
nixpkgs.pkgs = nixpkgs.legacyPackages.x86_64-linux;
}
*/
readOnlyPkgs = ./nixos/modules/misc/nixpkgs/read-only.nix;
};
};
}