mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +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.";
|
||||
type = types.bool;
|
||||
};
|
||||
lvm = mkEnableOption "lvm options required for correct booting";
|
||||
};
|
||||
|
||||
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 =
|
||||
let
|
||||
udevRules = concatStringsSep "\n" (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue