0928f51421
Note: not the actual initial commit. I swear I will stop repeatedly force pushing to this single commit eventually ok.
20 lines
412 B
Nix
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;
|
|
};
|
|
};
|
|
}
|