nixos/simp_le: Rename to security.acme
This commit is contained in:
parent
e7362a877d
commit
de24b00d41
@ -80,6 +80,7 @@
|
|||||||
./programs/xfs_quota.nix
|
./programs/xfs_quota.nix
|
||||||
./programs/zsh/zsh.nix
|
./programs/zsh/zsh.nix
|
||||||
./rename.nix
|
./rename.nix
|
||||||
|
./security/acme.nix
|
||||||
./security/apparmor.nix
|
./security/apparmor.nix
|
||||||
./security/apparmor-suid.nix
|
./security/apparmor-suid.nix
|
||||||
./security/ca.nix
|
./security/ca.nix
|
||||||
@ -388,7 +389,6 @@
|
|||||||
./services/security/hologram.nix
|
./services/security/hologram.nix
|
||||||
./services/security/munge.nix
|
./services/security/munge.nix
|
||||||
./services/security/physlock.nix
|
./services/security/physlock.nix
|
||||||
./services/security/simp_le.nix
|
|
||||||
./services/security/torify.nix
|
./services/security/torify.nix
|
||||||
./services/security/tor.nix
|
./services/security/tor.nix
|
||||||
./services/security/torsocks.nix
|
./services/security/torsocks.nix
|
||||||
|
@ -4,7 +4,7 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
cfg = config.services.simp_le;
|
cfg = config.security.acme;
|
||||||
|
|
||||||
certOpts = { ... }: {
|
certOpts = { ... }: {
|
||||||
options = {
|
options = {
|
||||||
@ -40,13 +40,13 @@ let
|
|||||||
user = mkOption {
|
user = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "root";
|
default = "root";
|
||||||
description = "User under which simp_le would run.";
|
description = "User running the ACME client.";
|
||||||
};
|
};
|
||||||
|
|
||||||
group = mkOption {
|
group = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "root";
|
default = "root";
|
||||||
description = "Group under which simp_le would run.";
|
description = "Group running the ACME client.";
|
||||||
};
|
};
|
||||||
|
|
||||||
postRun = mkOption {
|
postRun = mkOption {
|
||||||
@ -95,9 +95,9 @@ in
|
|||||||
###### interface
|
###### interface
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
services.simp_le = {
|
security.acme = {
|
||||||
directory = mkOption {
|
directory = mkOption {
|
||||||
default = "/var/lib/simp_le";
|
default = "/var/lib/acme";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = ''
|
description = ''
|
||||||
Directory where certs and other state will be stored by default.
|
Directory where certs and other state will be stored by default.
|
||||||
@ -138,9 +138,9 @@ in
|
|||||||
++ concatLists (mapAttrsToList (name: root: [ "-d" (if root == null then name else "${name}:${root}")]) data.extraDomains);
|
++ concatLists (mapAttrsToList (name: root: [ "-d" (if root == null then name else "${name}:${root}")]) data.extraDomains);
|
||||||
|
|
||||||
in nameValuePair
|
in nameValuePair
|
||||||
("simp_le-${cert}")
|
("acme-${cert}")
|
||||||
({
|
({
|
||||||
description = "simp_le cert renewal for ${cert}";
|
description = "ACME cert renewal for ${cert} using simp_le";
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
@ -177,13 +177,13 @@ in
|
|||||||
);
|
);
|
||||||
|
|
||||||
systemd.timers = flip mapAttrs' cfg.certs (cert: data: nameValuePair
|
systemd.timers = flip mapAttrs' cfg.certs (cert: data: nameValuePair
|
||||||
("simp_le-${cert}")
|
("acme-${cert}")
|
||||||
({
|
({
|
||||||
description = "timer for simp_le cert renewal of ${cert}";
|
description = "timer for ACME cert renewal of ${cert}";
|
||||||
wantedBy = [ "timers.target" ];
|
wantedBy = [ "timers.target" ];
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
OnCalendar = data.renewInterval;
|
OnCalendar = data.renewInterval;
|
||||||
Unit = "simp_le-${cert}.service";
|
Unit = "acme-simp_le-${cert}.service";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
);
|
);
|
Loading…
x
Reference in New Issue
Block a user