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:
parent
aa98422210
commit
3d9678ed60
21
modules/acme.nix
Normal file
21
modules/acme.nix
Normal 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
12
modules/zfs.nix
Normal 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;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user