mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 01:38:06 +00:00
[FileSystems] Add default lvm optimizations
This commit is contained in:
parent
47ada80342
commit
b8586fc211
1 changed files with 12 additions and 0 deletions
|
|
@ -36,10 +36,22 @@ in
|
||||||
description = "Automatically enable ncq_prio if it is supported by the SATA device.\nIt may improve latency.";
|
description = "Automatically enable ncq_prio if it is supported by the SATA device.\nIt may improve latency.";
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
};
|
};
|
||||||
|
lvm = mkEnableOption "lvm options required for correct booting";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
services.lvm = mkIf cfg.lvm {
|
||||||
|
boot.thin.enable = true;
|
||||||
|
dmeventd.enable = true;
|
||||||
|
};
|
||||||
|
boot.initrd.kernelModules = ifEnable cfg.lvm [
|
||||||
|
"dm-cache" "dm-cache-smq" "dm-cache-mq" "dm-cache-cleaner"
|
||||||
|
];
|
||||||
|
boot.kernelModules = ifEnable cfg.lvm [ "dm-cache" "dm-cache-smq" "dm-persistent-data" "dm-bio-prison" "dm-clone" "dm-crypt" "dm-writecache" "dm-mirror" "dm-snapshot"];
|
||||||
|
|
||||||
|
fileSystems."/boot".neededForBoot = mkDefault true;
|
||||||
|
|
||||||
services.udev =
|
services.udev =
|
||||||
let
|
let
|
||||||
udevRules = concatStringsSep "\n" (
|
udevRules = concatStringsSep "\n" (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue