mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-11 07:15:54 +03:00
nixos/soju: add adminSocket.enable option
This commit is contained in:
parent
4959d7bcd8
commit
5207bb723a
@ -485,6 +485,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
|
|||||||
|
|
||||||
- The `krb5` module has been rewritten and moved to `security.krb5`, moving all options but `security.krb5.enable` and `security.krb5.package` into `security.krb5.settings`.
|
- The `krb5` module has been rewritten and moved to `security.krb5`, moving all options but `security.krb5.enable` and `security.krb5.package` into `security.krb5.settings`.
|
||||||
|
|
||||||
|
- `services.soju` now has the option `adminSocket.enable`. This option defaults to `true`, and creates a unix admin socket at `/run/soju/admin`.
|
||||||
|
|
||||||
- Gitea 1.21 upgrade has several breaking changes, including:
|
- Gitea 1.21 upgrade has several breaking changes, including:
|
||||||
- Custom themes and other assets that were previously stored in `custom/public/*` now belong in `custom/public/assets/*`
|
- Custom themes and other assets that were previously stored in `custom/public/*` now belong in `custom/public/assets/*`
|
||||||
- New instances of Gitea using MySQL now ignore the `[database].CHARSET` config option and always use the `utf8mb4` charset, existing instances should migrate via the `gitea doctor convert` CLI command.
|
- New instances of Gitea using MySQL now ignore the `[database].CHARSET` config option and always use the `utf8mb4` charset, existing instances should migrate via the `gitea doctor convert` CLI command.
|
||||||
|
@ -5,7 +5,10 @@ with lib;
|
|||||||
let
|
let
|
||||||
cfg = config.services.soju;
|
cfg = config.services.soju;
|
||||||
stateDir = "/var/lib/soju";
|
stateDir = "/var/lib/soju";
|
||||||
listenCfg = concatMapStringsSep "\n" (l: "listen ${l}") cfg.listen;
|
runtimeDir = "/run/soju";
|
||||||
|
listen = cfg.listen
|
||||||
|
++ optional cfg.adminSocket.enable "unix+admin://${runtimeDir}/admin";
|
||||||
|
listenCfg = concatMapStringsSep "\n" (l: "listen ${l}") listen;
|
||||||
tlsCfg = optionalString (cfg.tlsCertificate != null)
|
tlsCfg = optionalString (cfg.tlsCertificate != null)
|
||||||
"tls ${cfg.tlsCertificate} ${cfg.tlsCertificateKey}";
|
"tls ${cfg.tlsCertificate} ${cfg.tlsCertificateKey}";
|
||||||
logCfg = optionalString cfg.enableMessageLogging
|
logCfg = optionalString cfg.enableMessageLogging
|
||||||
@ -68,6 +71,14 @@ in
|
|||||||
description = lib.mdDoc "Whether to enable message logging.";
|
description = lib.mdDoc "Whether to enable message logging.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
adminSocket.enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
Listen for admin connections from sojuctl at /run/soju/admin.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
httpOrigins = mkOption {
|
httpOrigins = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
@ -119,6 +130,7 @@ in
|
|||||||
Restart = "always";
|
Restart = "always";
|
||||||
ExecStart = "${cfg.package}/bin/soju -config ${configFile}";
|
ExecStart = "${cfg.package}/bin/soju -config ${configFile}";
|
||||||
StateDirectory = "soju";
|
StateDirectory = "soju";
|
||||||
|
RuntimeDirectory = "soju";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user