services: add Quassel

Unfortunately this service is stateful, you need to connect to it to set
up the first user.
This commit is contained in:
Bruno BELANYI 2021-02-06 12:11:55 +01:00
parent 41c777d2e2
commit 47396fbab0
3 changed files with 38 additions and 0 deletions

View file

@ -107,6 +107,8 @@
pirate.enable = true; pirate.enable = true;
# Regular backups # Regular backups
postgresql-backup.enable = true; postgresql-backup.enable = true;
# An IRC client daemon
quassel.enable = true;
# RSS provider for websites that do not provide any feeds # RSS provider for websites that do not provide any feeds
rss-bridge.enable = true; rss-bridge.enable = true;
# Usenet client # Usenet client

View file

@ -11,6 +11,7 @@
./nginx.nix ./nginx.nix
./pirate.nix ./pirate.nix
./postgresql-backup.nix ./postgresql-backup.nix
./quassel.nix
./rss-bridge.nix ./rss-bridge.nix
./sabnzbd.nix ./sabnzbd.nix
./transmission.nix ./transmission.nix

35
services/quassel.nix Normal file
View file

@ -0,0 +1,35 @@
# An IRC client daemon
{ config, lib, ... }:
let
cfg = config.my.services.quassel;
domain = config.networking.domain;
in
{
options.my.services.quassel = with lib; {
enable = mkEnableOption "Quassel IRC client daemon";
port = mkOption {
type = types.port;
default = 4242;
example = 8080;
description = "The port number for Quassel";
};
};
config = lib.mkIf cfg.enable {
services.quassel = {
enable = true;
portNumber = cfg.port;
# Let's be secure
requireSSL = true;
certificateFile = config.security.acme.certs."${domain}".directory + "/full.pem";
# The whole point *is* to connect from other clients
interfaces = [ "0.0.0.0" ];
};
# Allow Quassel to read the certificates.
users.groups.acme.members = [ "quassel" ];
# Open port for Quassel
networking.firewall.allowedTCPPorts = [ cfg.port ];
};
}