mirror of
https://github.com/nix-community/disko.git
synced 2026-12-03 14:33:28 +01:00
treewide: reformat
This commit is contained in:
1 parent
386f070c74
commit
f2bba803a7
9 files changed
+24
-22
No files matched your search
+3
-3
@@ -39,8 +39,7 @@ let
|
|||||||
loc: defs:
|
loc: defs:
|
||||||
let
|
let
|
||||||
evaled = lib.evalModules {
|
evaled = lib.evalModules {
|
||||||
modules =
|
modules = [
|
||||||
[
|
|
||||||
{
|
{
|
||||||
freeformType = lib.types.lazyAttrsOf lib.types.raw;
|
freeformType = lib.types.lazyAttrsOf lib.types.raw;
|
||||||
options.type = lib.mkOption {
|
options.type = lib.mkOption {
|
||||||
@@ -1195,6 +1194,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
binfmt = import ./binfmt.nix;
|
binfmt = import ./binfmt.nix;
|
||||||
} // outputs;
|
}
|
||||||
|
// outputs;
|
||||||
in
|
in
|
||||||
diskoLib
|
diskoLib
|
||||||
@@ -29,8 +29,7 @@ let
|
|||||||
|
|
||||||
vmTools = pkgs.vmTools.override (
|
vmTools = pkgs.vmTools.override (
|
||||||
{
|
{
|
||||||
rootModules =
|
rootModules = [
|
||||||
[
|
|
||||||
"9p"
|
"9p"
|
||||||
"9pnet_virtio" # we can drop those in future if we stop supporting 24.11
|
"9pnet_virtio" # we can drop those in future if we stop supporting 24.11
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -237,8 +237,7 @@ let
|
|||||||
(
|
(
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
boot.supportedFilesystems =
|
boot.supportedFilesystems = [
|
||||||
[
|
|
||||||
"btrfs"
|
"btrfs"
|
||||||
"cifs"
|
"cifs"
|
||||||
"f2fs"
|
"f2fs"
|
||||||
|
|||||||
+2
-1
@@ -227,7 +227,8 @@ in
|
|||||||
{
|
{
|
||||||
boot.initrd.luks.devices.${config.name} = {
|
boot.initrd.luks.devices.${config.name} = {
|
||||||
inherit (config) device;
|
inherit (config) device;
|
||||||
} // config.settings;
|
}
|
||||||
|
// config.settings;
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
++ (lib.optional (config.content != null) config.content._config);
|
++ (lib.optional (config.content != null) config.content._config);
|
||||||
|
|||||||
@@ -7,8 +7,7 @@
|
|||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
# Load kernel modules to ensure device mapper types are available
|
# Load kernel modules to ensure device mapper types are available
|
||||||
kernelModules =
|
kernelModules = [
|
||||||
[
|
|
||||||
# Prevent unbootable systems if LVM snapshots are present at boot time.
|
# Prevent unbootable systems if LVM snapshots are present at boot time.
|
||||||
"dm-snapshot"
|
"dm-snapshot"
|
||||||
]
|
]
|
||||||
@@ -182,13 +181,13 @@ in
|
|||||||
_config = lib.mkOption {
|
_config = lib.mkOption {
|
||||||
internal = true;
|
internal = true;
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
default =
|
default = [
|
||||||
[ { boot.initrd.kernelModules = kernelModules; } ]
|
{ boot.initrd.kernelModules = kernelModules; }
|
||||||
|
]
|
||||||
++ map (lv: [
|
++ map (lv: [
|
||||||
(lib.optional (lv.content != null) lv.content._config)
|
(lib.optional (lv.content != null) lv.content._config)
|
||||||
(lib.optional (lv.lvm_type != null) {
|
(lib.optional (lv.lvm_type != null) {
|
||||||
boot.initrd.kernelModules =
|
boot.initrd.kernelModules = [
|
||||||
[
|
|
||||||
(if lv.lvm_type == "mirror" then "dm-mirror" else "dm-raid")
|
(if lv.lvm_type == "mirror" then "dm-mirror" else "dm-raid")
|
||||||
]
|
]
|
||||||
++ lib.optional (lv.lvm_type == "raid0") "raid0"
|
++ lib.optional (lv.lvm_type == "raid0") "raid0"
|
||||||
|
|||||||
+2
-1
@@ -115,7 +115,8 @@
|
|||||||
boot.initrd.services.swraid.enable = true;
|
boot.initrd.services.swraid.enable = true;
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
] ++ lib.optional (config.content != null) config.content._config;
|
]
|
||||||
|
++ lib.optional (config.content != null) config.content._config;
|
||||||
description = "NixOS configuration";
|
description = "NixOS configuration";
|
||||||
};
|
};
|
||||||
_pkgs = lib.mkOption {
|
_pkgs = lib.mkOption {
|
||||||
|
|||||||
@@ -124,7 +124,8 @@
|
|||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
// lib.optionalAttrs
|
//
|
||||||
|
lib.optionalAttrs
|
||||||
(config.options.mountpoint or "" != "none" && config.options.canmount or "" != "off")
|
(config.options.mountpoint or "" != "none" && config.options.canmount or "" != "off")
|
||||||
{
|
{
|
||||||
fs.${config.mountpoint} = ''
|
fs.${config.mountpoint} = ''
|
||||||
@@ -149,7 +150,8 @@
|
|||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
// lib.optionalAttrs
|
//
|
||||||
|
lib.optionalAttrs
|
||||||
(config.options.mountpoint or "" != "none" && config.options.canmount or "" != "off")
|
(config.options.mountpoint or "" != "none" && config.options.canmount or "" != "off")
|
||||||
{
|
{
|
||||||
fs.${config.mountpoint} = ''
|
fs.${config.mountpoint} = ''
|
||||||
@@ -170,8 +172,7 @@
|
|||||||
device = "${config._name}";
|
device = "${config._name}";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
options =
|
options =
|
||||||
config.mountOptions
|
config.mountOptions ++ lib.optional ((config.options.mountpoint or "") != "legacy") "zfsutil";
|
||||||
++ lib.optional ((config.options.mountpoint or "") != "legacy") "zfsutil";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
description = "NixOS configuration";
|
description = "NixOS configuration";
|
||||||
|
|||||||
@@ -25,8 +25,9 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
boot.kernelParams =
|
boot.kernelParams = [
|
||||||
[ "console=tty0" ]
|
"console=tty0"
|
||||||
|
]
|
||||||
++ (lib.optional (pkgs.stdenv.hostPlatform.isAarch) "ttyAMA0,115200")
|
++ (lib.optional (pkgs.stdenv.hostPlatform.isAarch) "ttyAMA0,115200")
|
||||||
++ (lib.optional (pkgs.stdenv.hostPlatform.isRiscV64) "ttySIF0,115200")
|
++ (lib.optional (pkgs.stdenv.hostPlatform.isRiscV64) "ttySIF0,115200")
|
||||||
++ [ "console=ttyS0,115200" ];
|
++ [ "console=ttyS0,115200" ];
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ let
|
|||||||
|
|
||||||
self.nixosConfigurations.testmachine.config.system.build.toplevel
|
self.nixosConfigurations.testmachine.config.system.build.toplevel
|
||||||
self.nixosConfigurations.testmachine.config.system.build.diskoScript
|
self.nixosConfigurations.testmachine.config.system.build.diskoScript
|
||||||
] ++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs);
|
]
|
||||||
|
++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs);
|
||||||
|
|
||||||
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
|
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
|
||||||
in
|
in
|
||||||
|
|||||||
Reference in new issue
Block a user