mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2025-12-11 23:50:05 +01:00
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:
parent
a393654c3b
commit
ff5127ea0a
12 changed files with 40 additions and 35 deletions
|
|
@ -13,7 +13,7 @@
|
||||||
start = "0";
|
start = "0";
|
||||||
end = "1M";
|
end = "1M";
|
||||||
part-type = "primary";
|
part-type = "primary";
|
||||||
flags = ["bios_grub"];
|
flags = [ "bios_grub" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
type = "partition";
|
type = "partition";
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
start = "0";
|
start = "0";
|
||||||
end = "1M";
|
end = "1M";
|
||||||
part-type = "primary";
|
part-type = "primary";
|
||||||
flags = ["bios_grub"];
|
flags = [ "bios_grub" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
type = "partition";
|
type = "partition";
|
||||||
|
|
|
||||||
|
|
@ -35,12 +35,12 @@
|
||||||
};
|
};
|
||||||
# Mountpoints inferred from subvolume name
|
# Mountpoints inferred from subvolume name
|
||||||
"/home" = {
|
"/home" = {
|
||||||
mountOptions = ["compress=zstd"];
|
mountOptions = [ "compress=zstd" ];
|
||||||
};
|
};
|
||||||
"/nix" = {
|
"/nix" = {
|
||||||
mountOptions = ["compress=zstd" "noatime"];
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||||||
};
|
};
|
||||||
"/test" = {};
|
"/test" = { };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@
|
||||||
part-type = "primary";
|
part-type = "primary";
|
||||||
start = "1024MiB";
|
start = "1024MiB";
|
||||||
end = "100%";
|
end = "100%";
|
||||||
flags = ["bios_grub"];
|
flags = [ "bios_grub" ];
|
||||||
content = {
|
content = {
|
||||||
type = "luks";
|
type = "luks";
|
||||||
name = "crypted";
|
name = "crypted";
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
start = "0";
|
start = "0";
|
||||||
end = "1M";
|
end = "1M";
|
||||||
part-type = "primary";
|
part-type = "primary";
|
||||||
flags = ["bios_grub"];
|
flags = [ "bios_grub" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "root";
|
name = "root";
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
type = "partition";
|
type = "partition";
|
||||||
start = "0";
|
start = "0";
|
||||||
end = "1M";
|
end = "1M";
|
||||||
flags = ["bios_grub"];
|
flags = [ "bios_grub" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
type = "partition";
|
type = "partition";
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
start = "0";
|
start = "0";
|
||||||
end = "1M";
|
end = "1M";
|
||||||
part-type = "primary";
|
part-type = "primary";
|
||||||
flags = ["bios_grub"];
|
flags = [ "bios_grub" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
type = "partition";
|
type = "partition";
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
start = "0";
|
start = "0";
|
||||||
end = "1M";
|
end = "1M";
|
||||||
part-type = "primary";
|
part-type = "primary";
|
||||||
flags = ["bios_grub"];
|
flags = [ "bios_grub" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
type = "partition";
|
type = "partition";
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, lib
|
||||||
lib,
|
, ...
|
||||||
...
|
}:
|
||||||
}: let
|
let
|
||||||
# We just import from the repository for testing here:
|
# We just import from the repository for testing here:
|
||||||
disko = import ../../. {
|
disko = import ../../. {
|
||||||
inherit lib;
|
inherit lib;
|
||||||
|
|
@ -41,7 +41,8 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(disko.config cfg)
|
(disko.config cfg)
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
start = "0";
|
start = "0";
|
||||||
end = "1M";
|
end = "1M";
|
||||||
part-type = "primary";
|
part-type = "primary";
|
||||||
flags = ["bios_grub"];
|
flags = [ "bios_grub" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "root";
|
name = "root";
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
, makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest
|
, makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
linux-bcachefs = pkgs.callPackage ../linux-testing-bcachefs.nix {};
|
linux-bcachefs = pkgs.callPackage ../linux-testing-bcachefs.nix { };
|
||||||
in
|
in
|
||||||
makeDiskoTest {
|
makeDiskoTest {
|
||||||
disko-config = ../example/bcachefs.nix;
|
disko-config = ../example/bcachefs.nix;
|
||||||
|
|
@ -14,11 +14,13 @@ makeDiskoTest {
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
boot.supportedFilesystems = [ "bcachefs" ];
|
boot.supportedFilesystems = [ "bcachefs" ];
|
||||||
# disable zfs so we can support latest kernel
|
# disable zfs so we can support latest kernel
|
||||||
nixpkgs.overlays = [(final: super: {
|
nixpkgs.overlays = [
|
||||||
zfs = super.zfs.overrideAttrs(_: {
|
(final: super: {
|
||||||
meta.platforms = [];
|
zfs = super.zfs.overrideAttrs (_: {
|
||||||
});
|
meta.platforms = [ ];
|
||||||
})];
|
});
|
||||||
|
})
|
||||||
|
];
|
||||||
boot.kernelPackages = pkgs.lib.mkForce (pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor linux-bcachefs));
|
boot.kernelPackages = pkgs.lib.mkForce (pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor linux-bcachefs));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,14 @@ let
|
||||||
lib = pkgs.lib;
|
lib = pkgs.lib;
|
||||||
makeDiskoTest = (pkgs.callPackage ./lib.nix { inherit makeTest eval-config; }).makeDiskoTest;
|
makeDiskoTest = (pkgs.callPackage ./lib.nix { inherit makeTest eval-config; }).makeDiskoTest;
|
||||||
|
|
||||||
evalTest = name: configFile: let
|
evalTest = name: configFile:
|
||||||
disko-config = import configFile;
|
let
|
||||||
in {
|
disko-config = import configFile;
|
||||||
"${name}-tsp-create" = pkgs.writeScript "create" ((pkgs.callPackage ../. { }).create disko-config);
|
in
|
||||||
"${name}-tsp-mount" = pkgs.writeScript "mount" ((pkgs.callPackage ../. { }).mount disko-config);
|
{
|
||||||
};
|
"${name}-tsp-create" = pkgs.writeScript "create" ((pkgs.callPackage ../. { }).create disko-config);
|
||||||
|
"${name}-tsp-mount" = pkgs.writeScript "mount" ((pkgs.callPackage ../. { }).mount disko-config);
|
||||||
|
};
|
||||||
|
|
||||||
allTestFilenames =
|
allTestFilenames =
|
||||||
builtins.map (lib.removeSuffix ".nix") (
|
builtins.map (lib.removeSuffix ".nix") (
|
||||||
|
|
@ -21,8 +23,8 @@ let
|
||||||
);
|
);
|
||||||
|
|
||||||
allTests = lib.genAttrs allTestFilenames (test: import (./. + "/${test}.nix") { inherit makeDiskoTest pkgs; }) //
|
allTests = lib.genAttrs allTestFilenames (test: import (./. + "/${test}.nix") { inherit makeDiskoTest pkgs; }) //
|
||||||
evalTest "lvm-luks-example" ../example/config.nix // {
|
evalTest "lvm-luks-example" ../example/config.nix // {
|
||||||
standalone = (pkgs.nixos [ ../example/stand-alone/configuration.nix ]).config.system.build.toplevel;
|
standalone = (pkgs.nixos [ ../example/stand-alone/configuration.nix ]).config.system.build.toplevel;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
allTests
|
allTests
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@
|
||||||
documentation.enable = false;
|
documentation.enable = false;
|
||||||
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
substituters = lib.mkForce [];
|
substituters = lib.mkForce [ ];
|
||||||
hashed-mirrors = null;
|
hashed-mirrors = null;
|
||||||
connect-timeout = 1;
|
connect-timeout = 1;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -325,7 +325,7 @@ rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
subTypes = lib.mapAttrs (_: diskoLib.mkSubType) {
|
subTypes = lib.mapAttrs (_: diskoLib.mkSubType) {
|
||||||
nodev = ./nodev.nix;
|
nodev = ./nodev.nix;
|
||||||
btrfs = ./btrfs.nix;
|
btrfs = ./btrfs.nix;
|
||||||
btrfs_subvol = ./btrfs_subvol.nix;
|
btrfs_subvol = ./btrfs_subvol.nix;
|
||||||
filesystem = ./filesystem.nix;
|
filesystem = ./filesystem.nix;
|
||||||
|
|
@ -341,6 +341,6 @@ rec {
|
||||||
mdadm = ./mdadm.nix;
|
mdadm = ./mdadm.nix;
|
||||||
mdraid = ./mdraid.nix;
|
mdraid = ./mdraid.nix;
|
||||||
luks = ./luks.nix;
|
luks = ./luks.nix;
|
||||||
disk = ./disk.nix;
|
disk = ./disk.nix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue