dotfiles/modules/os/core/fs/ssd.nix

20 lines
412 B
Nix
Raw Normal View History

{ config, lib, ... }:
let
cfg = config.my.fs.ssd;
in {
options.my.fs.ssd = {
enable = lib.mkEnableOption null;
enableLuksIntegration = lib.mkEnableOption null // {
default = true;
};
};
config = lib.mkIf cfg.enable {
boot.initrd.luks.devices.${config.my.fs.luks.name} = lib.mkIf cfg.enableLuksIntegration {
allowDiscards = true;
bypassWorkqueues = true;
};
};
}