nixfmt-rfc-style

There is nothing in this commit except for the changes made by
nix-shell -p nixfmt-rfc-style --run "nixfmt ."

If this has mucked up your open branches then sorry about that. You
can probably nixfmt them to match before merging
This commit is contained in:
Daniel Barlow
2025-02-10 21:55:08 +00:00
parent 13cc5a8992
commit 7e2b0068e6
211 changed files with 6049 additions and 4355 deletions

View File

@@ -1,15 +1,18 @@
{
pseudofile
}: let
pseudofile,
}:
let
inherit (pseudofile) dir;
structure = {
service = dir {
s6-linux-init-runleveld = dir {
notification-fd = { file = "3"; };
notification-fd = {
file = "3";
};
run = {
file = ''
hello
world
hello
world
'';
mode = "0755";
};
@@ -21,8 +24,8 @@
};
run = {
file = ''
s6-linux-init/bin/s6-linux-init-shutdownd -c "/etc/s6-linux-init/current" -g 3000
'';
s6-linux-init/bin/s6-linux-init-shutdownd -c "/etc/s6-linux-init/current" -g 3000
'';
mode = "0755";
};
@@ -32,14 +35,19 @@
type = "i";
mode = "0600";
};
notification-fd = { file = "3"; };
notification-fd = {
file = "3";
};
run = {
file = ''
gdsgdfgsdgf
gdsgdfgsdgf
'';
};
};
};
uncaught-logs = (dir {}) // {mode = "2750";};
uncaught-logs = (dir { }) // {
mode = "2750";
};
};
in pseudofile.write "pseudo.s6-init" structure
in
pseudofile.write "pseudo.s6-init" structure

View File

@@ -1,15 +1,21 @@
let
overlay = import <liminix/overlay.nix>;
pkgs = import <nixpkgs> { overlays = [overlay]; };
fixture = pkgs.callPackage ./fixture.nix {};
in pkgs.runCommand "check" {
nativeBuildInputs = with pkgs; [ squashfsTools qprint ] ;
} ''
set -e
diff ${fixture} ${./result.expected}
test -f /tmp/out.squashfs && rm /tmp/out.squashfs
mksquashfs - /tmp/out.squashfs -p '/ d 755 0 0' -pf ${fixture} -quiet -no-progress
foo="$(unsquashfs -cat /tmp/out.squashfs service/s6-linux-init-runleveld/run)"
test "$foo" = "$(printf "hello\nworld")"
date > $out
''
pkgs = import <nixpkgs> { overlays = [ overlay ]; };
fixture = pkgs.callPackage ./fixture.nix { };
in
pkgs.runCommand "check"
{
nativeBuildInputs = with pkgs; [
squashfsTools
qprint
];
}
''
set -e
diff ${fixture} ${./result.expected}
test -f /tmp/out.squashfs && rm /tmp/out.squashfs
mksquashfs - /tmp/out.squashfs -p '/ d 755 0 0' -pf ${fixture} -quiet -no-progress
foo="$(unsquashfs -cat /tmp/out.squashfs service/s6-linux-init-runleveld/run)"
test "$foo" = "$(printf "hello\nworld")"
date > $out
''