mirror of
https://github.com/nix-community/disko.git
synced 2026-12-02 05:53:28 +01:00
style: Disable inherit pattern check in statix
As discussed in [this comment](https://github.com/nix-community/disko/pull/143#discussion_r1097912402), as a blanket rule converting everything possible to `inherit` like statements can hurt readability. Add config file for statix to disable these checks and fixes, then rerun the autofix with these options.
This commit is contained in:
11 files changed
+16
-12
No files matched your search
+1
-1
@@ -187,7 +187,7 @@ rec {
|
||||
internal = true;
|
||||
readOnly = true;
|
||||
type = lib.types.functionTo diskoLib.jsonType;
|
||||
inherit (attrs) default;
|
||||
default = attrs.default;
|
||||
description = "Mount script";
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@
|
||||
vgchange -a y
|
||||
${lib.concatMapStrings (x: x.dev or "") (lib.attrValues lvMounts)}
|
||||
'';
|
||||
inherit (lvMounts) fs;
|
||||
fs = lvMounts.fs;
|
||||
};
|
||||
};
|
||||
_config = lib.mkOption {
|
||||
|
||||
+2
-2
@@ -54,8 +54,8 @@
|
||||
readOnly = true;
|
||||
default = [{
|
||||
fileSystems.${config.mountpoint} = {
|
||||
inherit (config) device;
|
||||
inherit (config) fsType;
|
||||
device = config.device;
|
||||
fsType = config.fsType;
|
||||
options = config.mountOptions;
|
||||
};
|
||||
}];
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@
|
||||
default = dev: [{
|
||||
swapDevices = [{
|
||||
device = dev;
|
||||
inherit (config) randomEncryption;
|
||||
randomEncryption = config.randomEncryption;
|
||||
}];
|
||||
}];
|
||||
description = "NixOS configuration";
|
||||
|
||||
Reference in new issue
Block a user