diff options
author | Robert Hensing <roberth@users.noreply.github.com> | 2023-12-30 11:25:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-30 11:25:54 +0100 |
commit | 47d6b21930a651faf1fd9f217423281c5332dc9f (patch) | |
tree | 701585ad1cd31453c22fbf638815d5155319854f | |
parent | f8c13ee878f11af512787c747ce2e600490475df (diff) |
flake.nix: Add caveats
-rw-r--r-- | flake.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix index 6fc0d4f87932..580f572ff32c 100644 --- a/flake.nix +++ b/flake.nix @@ -34,6 +34,8 @@ checks.x86_64-linux = { tarball = jobs.tarball; # Test that ensures that the nixosSystem function can accept a lib argument + # Note: prefer not to extend or modify `lib`, especially if you want to share reusable modules + # alternatives include: `import` a file, or put a custom library in an option or in `_module.args.<libname>` nixosSystemAcceptsLib = (self.lib.nixosSystem { lib = self.lib.extend (final: prev: { ifThisFunctionIsMissingTheTestFails = final.id; @@ -45,7 +47,8 @@ nixpkgs.hostPlatform = "x86_64-linux"; boot.loader.grub.enable = false; fileSystems."/".device = "nodev"; - system.stateVersion = lib.versions.majorMinor lib.version; + # See https://search.nixos.org/options?show=system.stateVersion&query=stateversion + system.stateVersion = lib.versions.majorMinor lib.version; # DON'T do this in real configs! }) ]; }).config.system.build.toplevel; |