[Security/Encryption] init encryption security module

This commit is contained in:
Antoine Viallon 2023-08-10 16:21:25 +02:00
parent 1d5e9a0100
commit ecca71149a
Signed by: aviallon
GPG key ID: 186FC35EDEB25716
2 changed files with 21 additions and 0 deletions

View file

@ -2,5 +2,6 @@
{
imports = [
./hardening.nix
./encryption.nix
];
}

20
security/encryption.nix Normal file
View file

@ -0,0 +1,20 @@
{ 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
];
};
}