mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
22 lines
540 B
Nix
22 lines
540 B
Nix
{ config, pkgs, lib, ... }:
|
|
with lib;
|
|
let
|
|
cfg = config.aviallon.security.encryption;
|
|
in {
|
|
options.aviallon.security.encryption = {
|
|
enable = mkEnableOption "encryption-related tools and programs";
|
|
cryptsetup.package = mkOption {
|
|
description = "Which cryptsetup package to use";
|
|
type = types.path;
|
|
default = pkgs.cryptsetup;
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
environment.systemPackages = with pkgs; [
|
|
cfg.cryptsetup.package
|
|
];
|
|
|
|
boot.initrd.availableKernelModules = [ "cryptd" ];
|
|
};
|
|
}
|