diff options
author | Robert Hensing <robert@roberthensing.nl> | 2023-05-07 15:37:28 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2023-05-10 15:55:09 +0200 |
commit | e5db80ae487b59b4e9f950d68983ffb0575e26c6 (patch) | |
tree | b24eb183f8e6851d0a1daca9a702aa0c58780ae9 /flake.nix | |
parent | 693e2c32871dcea7fe2ef455ee77571d3a117499 (diff) |
nixosModules.pkgsReadOnly: init
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix index f9442d8ea2d2..fa00bffcdf92 100644 --- a/flake.nix +++ b/flake.nix @@ -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; }; }; } |