style: Re-apply style normalisation

Originally this was manually applied with;

```sh
nixpkgs-fmt **.nix && statix fix
```

but I overlooked the fact that `**.nix` would only expand to files in
the root (I should have used `**/*.nix`).

Previous commit adds `nix fmt` support which passes `.` to `nixpkgs-fmt`
(if no other path is explicitly specified when running `nix fmt`).

This commit includes the changes made by running `nix fmt`.
This commit is contained in:
Chris Scutcher 2023-02-07 15:56:08 +00:00
parent a393654c3b
commit ff5127ea0a
No known key found for this signature in database
GPG key ID: 19C0BED130CD39CE
12 changed files with 40 additions and 35 deletions

View file

@ -2,7 +2,7 @@
, makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest
}:
let
linux-bcachefs = pkgs.callPackage ../linux-testing-bcachefs.nix {};
linux-bcachefs = pkgs.callPackage ../linux-testing-bcachefs.nix { };
in
makeDiskoTest {
disko-config = ../example/bcachefs.nix;
@ -14,11 +14,13 @@ makeDiskoTest {
extraConfig = {
boot.supportedFilesystems = [ "bcachefs" ];
# disable zfs so we can support latest kernel
nixpkgs.overlays = [(final: super: {
zfs = super.zfs.overrideAttrs(_: {
meta.platforms = [];
});
})];
nixpkgs.overlays = [
(final: super: {
zfs = super.zfs.overrideAttrs (_: {
meta.platforms = [ ];
});
})
];
boot.kernelPackages = pkgs.lib.mkForce (pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor linux-bcachefs));
};
}

View file

@ -6,12 +6,14 @@ let
lib = pkgs.lib;
makeDiskoTest = (pkgs.callPackage ./lib.nix { inherit makeTest eval-config; }).makeDiskoTest;
evalTest = name: configFile: let
disko-config = import configFile;
in {
"${name}-tsp-create" = pkgs.writeScript "create" ((pkgs.callPackage ../. { }).create disko-config);
"${name}-tsp-mount" = pkgs.writeScript "mount" ((pkgs.callPackage ../. { }).mount disko-config);
};
evalTest = name: configFile:
let
disko-config = import configFile;
in
{
"${name}-tsp-create" = pkgs.writeScript "create" ((pkgs.callPackage ../. { }).create disko-config);
"${name}-tsp-mount" = pkgs.writeScript "mount" ((pkgs.callPackage ../. { }).mount disko-config);
};
allTestFilenames =
builtins.map (lib.removeSuffix ".nix") (
@ -21,8 +23,8 @@ let
);
allTests = lib.genAttrs allTestFilenames (test: import (./. + "/${test}.nix") { inherit makeDiskoTest pkgs; }) //
evalTest "lvm-luks-example" ../example/config.nix // {
standalone = (pkgs.nixos [ ../example/stand-alone/configuration.nix ]).config.system.build.toplevel;
};
evalTest "lvm-luks-example" ../example/config.nix // {
standalone = (pkgs.nixos [ ../example/stand-alone/configuration.nix ]).config.system.build.toplevel;
};
in
allTests

View file

@ -100,7 +100,7 @@
documentation.enable = false;
nix.settings = {
substituters = lib.mkForce [];
substituters = lib.mkForce [ ];
hashed-mirrors = null;
connect-timeout = 1;
};