22
0
mirror of https://github.com/SuperSandro2000/nixos-modules.git synced 2024-06-02 06:19:22 +02:00

Add zfs and acme module

This commit is contained in:
Sandro - 2023-01-02 23:42:25 +01:00
parent aa98422210
commit 3d9678ed60
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
2 changed files with 33 additions and 0 deletions

21
modules/acme.nix Normal file
View File

@ -0,0 +1,21 @@
{ config, lib, ... }:
let
cfg = config.security.acme;
in
{
options.security.acme.staging = lib.mkOption {
type = lib.types.bool;
default = false;
description = lib.mdDoc ''
If set to true, use Let's Encrypt's staging environment instead of the production one.
The staging environment has much higher rate limits but does not generate fully signed certificates.
This is great for testing when the normla rate limit is hit fast and impacts other people on the same IP.
See <literal>https://letsencrypt.org/docs/staging-environment</literal> for more detail.
'';
};
config = lib.mkIf cfg.staging {
security.acme.server = "https://acme-staging-v02.api.letsencrypt.org/directory";
};
}

12
modules/zfs.nix Normal file
View File

@ -0,0 +1,12 @@
{ config, lib, ... }:
let
cfg = config.boot.zfs;
in
{
config = lib.mkIf cfg.enabled {
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
services.zfs.autoScrub.enable = true;
};
}