mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
nix: add function to catch currentSystem used anywhere
This commit is contained in:
parent
8d37d38195
commit
f83a35403e
1 changed files with 11 additions and 1 deletions
12
default.nix
12
default.nix
|
|
@ -1,4 +1,14 @@
|
|||
{sources ? import ./npins}: {
|
||||
{sources ? import ./npins}: let
|
||||
# Catch where currentSystem is evaluated
|
||||
fakeImport = builtins.scopedImport {
|
||||
builtins =
|
||||
builtins
|
||||
// {
|
||||
currentSystem = throw "`currentSystem' is disabled";
|
||||
};
|
||||
import = fakeImport;
|
||||
};
|
||||
in {
|
||||
lib = import (sources.nixpkgs + "/lib");
|
||||
|
||||
nixosConfigurations = builtins.mapAttrs (_: import (sources.nixpkgs + "/nixos/lib/eval-config.nix")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue