dotfiles/modules/os/core/fs/ssd.nix
eriedaberrie 9dbe7b42a4 Initial commit
Note: not the actual initial commit.

I swear I will stop repeatedly force pushing to this single commit eventually
ok.
2024-08-21 11:05:56 -07:00

20 lines
412 B
Nix

{ 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;
};
};
}