-
-
Save cleverca22/c2d134c315b0b02d8d7807034735a326 to your computer and use it in GitHub Desktop.
nix-par
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
pkgs = import <nixpkgs> {}; | |
lib = pkgs.lib; | |
mkSystem = n: import <nixpkgs/nixos> { | |
configuration = { | |
networking.hostName = "dummy_${toString n}"; | |
fileSystems."/" = { | |
device = "/dev/sda1"; | |
fsType = "ext4"; | |
}; | |
boot.loader.grub.device = "/dev/sda"; | |
}; | |
}; | |
systems = map mkSystem (lib.range 0 10); | |
toplevels = map (x: x.config.system.build.toplevel) systems; | |
in { | |
inherit systems toplevels; | |
one = builtins.elemAt toplevels 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[clever@amd-nixos:~/iohk/nix-par]$ time nix-instantiate default.nix -A toplevels | |
warning: you did not specify ‘--add-root’; the result might be removed by the garbage collector | |
/nix/store/c9nzzsgk0pwpkj5s19h186q38n29iq7a-nixos-system-dummy_0-18.03pre125026.f607771d0f5.drv | |
/nix/store/p5c6sj16iqpqawmw0kzvc3l4xibgji8g-nixos-system-dummy_1-18.03pre125026.f607771d0f5.drv | |
/nix/store/xlb5fhdfvvixymfk07k34zxcqshihwsp-nixos-system-dummy_2-18.03pre125026.f607771d0f5.drv | |
/nix/store/24yhqvp401mvkx8h7bz10w1q6lqp407w-nixos-system-dummy_3-18.03pre125026.f607771d0f5.drv | |
/nix/store/yq2gqzsindyns811pj56xvmdv1wc2wc1-nixos-system-dummy_4-18.03pre125026.f607771d0f5.drv | |
/nix/store/9fzpax0svyq1p87n4zyfqp4inb8sbwgs-nixos-system-dummy_5-18.03pre125026.f607771d0f5.drv | |
/nix/store/r3ckk1kcif980y0w0s0z8lh273cfnh0r-nixos-system-dummy_6-18.03pre125026.f607771d0f5.drv | |
/nix/store/h2pmkybpp91z968w0ns96nds32i7v0d7-nixos-system-dummy_7-18.03pre125026.f607771d0f5.drv | |
/nix/store/q3dk2g7qii7kfyll77937jda9r7b3y3w-nixos-system-dummy_8-18.03pre125026.f607771d0f5.drv | |
/nix/store/wy872cwv8b5wwrlp28blxya8hwqiq2r7-nixos-system-dummy_9-18.03pre125026.f607771d0f5.drv | |
/nix/store/489iwvw9vr7wl6wcaia3gvc31yzymzwq-nixos-system-dummy_10-18.03pre125026.f607771d0f5.drv | |
real 0m24.480s | |
user 0m36.686s | |
sys 0m1.263s | |
[clever@amd-nixos:~/iohk/nix-par]$ time nix-instantiate default.nix -A one | |
warning: you did not specify ‘--add-root’; the result might be removed by the garbage collector | |
/nix/store/c9nzzsgk0pwpkj5s19h186q38n29iq7a-nixos-system-dummy_0-18.03pre125026.f607771d0f5.drv | |
real 0m3.182s | |
user 0m1.873s | |
sys 0m0.361s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment