mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 20:39:18 -08:00
fix(cloudflared): explicit user
This commit is contained in:
parent
d80fd6fd5f
commit
e0fe5bcd6f
4 changed files with 22 additions and 6 deletions
|
|
@ -2,9 +2,11 @@ let
|
|||
tunnelModule = {
|
||||
pkgs,
|
||||
config,
|
||||
gensokyo-zone,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (gensokyo-zone.lib) unmerged;
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
settingsFormat = pkgs.formats.json {};
|
||||
in {
|
||||
|
|
@ -24,6 +26,10 @@ let
|
|||
default = {};
|
||||
};
|
||||
};
|
||||
systemd.extraServiceSettings = mkOption {
|
||||
type = unmerged.types.attrs;
|
||||
default = {};
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
@ -35,6 +41,7 @@ in
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (gensokyo-zone.lib) unmerged;
|
||||
inherit (lib.attrsets) mapAttrsToList mapAttrs' nameValuePair filterAttrsRecursive;
|
||||
inherit (lib.lists) singleton;
|
||||
inherit (lib.modules) mkIf mkMerge mkForce;
|
||||
|
|
@ -63,6 +70,10 @@ in
|
|||
};
|
||||
});
|
||||
};
|
||||
systemd.extraServiceSettings = mkOption {
|
||||
type = unmerged.types.attrs;
|
||||
default = {};
|
||||
};
|
||||
};
|
||||
config.services.cloudflared = {
|
||||
extraArgs = mkIf (cfg.metricsPort != null) [
|
||||
|
|
@ -112,6 +123,8 @@ in
|
|||
];
|
||||
};
|
||||
}
|
||||
(unmerged.mergeAttrs tunnel.systemd.extraServiceSettings)
|
||||
(unmerged.mergeAttrs cfg.systemd.extraServiceSettings)
|
||||
(mkIf tunnel.extraTunnel.enable {
|
||||
serviceConfig = {
|
||||
inherit RuntimeDirectory;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue