65be8f20e0
* users/grfn/system/home/yeren: remove obsolete awscli2 overrides * ops: make new isSystemUser || isNormalUser assertion happy * users/grfn/system/system/mugwump: make buildkite agents system users * users/tazjin/nixos/camden: set isSystemUser = true for git * users/tazjin/emacs: Remove missing & broken packages * third_party/openldap: remove, as the argon2 module is now enabled upstream * third_party/gerrit_plugins: Pinned new unstable hashes * third_party/nix, third_party/grpc: Disabled CI as these are broken * third_party/overlays/emacs: Bumped version to stay in sync with channel * third_party/buzz: Update LIBCLANG_PATH to reference libclang.lib, since libclang's default output no longer contains libclang.so * users/grfn/system/home: Install julia-stable instead of julia (which aliases to julia-lts), as the latter depends on an insecure version of libgit Change-Id: Iff33b0ecb0ef07a82d1de35e23c40d2f4bf0f8ed Reviewed-on: https://cl.tvl.fyi/c/depot/+/3001 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: grfn <grfn@gws.fyi>
76 lines
1.7 KiB
Nix
76 lines
1.7 KiB
Nix
# A more modern module for running Quassel.
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
cfg = config.services.depot.quassel;
|
|
quasselDaemon = pkgs.quassel.override {
|
|
monolithic = false;
|
|
enableDaemon = true;
|
|
withKDE = false;
|
|
};
|
|
in {
|
|
options.services.depot.quassel = with lib; {
|
|
enable = mkEnableOption "Quassel IRC daemon";
|
|
|
|
acmeHost = mkOption {
|
|
description = "ACME host to use for the Quassel TLS certificate";
|
|
type = lib.types.str;
|
|
};
|
|
|
|
bindAddresses = mkOption {
|
|
description = "Addresses Quassel will bind to/listen on";
|
|
default = [ "127.0.0.1" ];
|
|
};
|
|
|
|
logLevel = mkOption {
|
|
description = "Log level for Quassel Core";
|
|
default = "Info";
|
|
type = lib.types.enum [
|
|
"Debug"
|
|
"Info"
|
|
"Warning"
|
|
"Error"
|
|
];
|
|
};
|
|
|
|
port = mkOption {
|
|
default = 6698;
|
|
description = ''
|
|
The port number the Quassel daemon will be listening to.
|
|
'';
|
|
};
|
|
};
|
|
|
|
config = with lib; mkIf cfg.enable {
|
|
systemd.services.quassel = {
|
|
description = "Quassel IRC daemon";
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
script = concatStringsSep " " [
|
|
"${quasselDaemon}/bin/quasselcore"
|
|
"--listen=${concatStringsSep "," cfg.bindAddresses}"
|
|
"--port=${toString cfg.port}"
|
|
"--configdir=/var/lib/quassel"
|
|
"--require-ssl"
|
|
"--ssl-cert=/var/lib/acme/${cfg.acmeHost}/full.pem"
|
|
"--loglevel=${cfg.logLevel}"
|
|
];
|
|
|
|
serviceConfig = {
|
|
Restart = "always";
|
|
User = "quassel";
|
|
Group = "quassel";
|
|
StateDirectory = "quassel";
|
|
};
|
|
};
|
|
|
|
users = {
|
|
users.quassel = {
|
|
isSystemUser = true;
|
|
group = "quassel";
|
|
};
|
|
|
|
groups.quassel = {};
|
|
};
|
|
};
|
|
}
|