Skip to content

Commit

Permalink
refactor: Format Nix file using Alejandra
Browse files Browse the repository at this point in the history
  • Loading branch information
l0b0 committed Jan 14, 2024
1 parent 9f3fc6d commit a378464
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions test.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Realizes <num>> of derivations with size of <size>MB
{ size ? 1 # MB
, num ? 10 # count
, currentTime ? builtins.currentTime
, noChroot ? false
{
size ? 1, # MB
num ? 10, # count
currentTime ? builtins.currentTime,
noChroot ? false,
}:

with import <nixpkgs> {};

let
drv = i: runCommand "${toString currentTime}-${toString i}" {
__noChroot = noChroot;
} ''
dd if=/dev/zero of=$out bs=${toString size}MB count=1
'';
in writeText "empty-${toString num}-${toString size}MB" ''
${lib.concatMapStringsSep "" drv (lib.range 1 num)}
''
with import <nixpkgs> {}; let
drv = i:
runCommand "${toString currentTime}-${toString i}" {
__noChroot = noChroot;
} ''
dd if=/dev/zero of=$out bs=${toString size}MB count=1
'';
in
writeText "empty-${toString num}-${toString size}MB" ''
${lib.concatMapStringsSep "" drv (lib.range 1 num)}
''

0 comments on commit a378464

Please sign in to comment.