mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 18:04:41 +02:00
mumble-server: move as new config
This commit is contained in:
parent
0f7689d3ef
commit
3ace595938
4 changed files with 40 additions and 27 deletions
38
modules/services/mumble-server/default.nix
Normal file
38
modules/services/mumble-server/default.nix
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
# Have a good quality voice chat
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.my.services.mumble-server;
|
||||||
|
#domain = "voice.${config.networking.domain}";
|
||||||
|
domain = "voice.buehler.rocks";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.services.mumble-server = {
|
||||||
|
enable = lib.mkEnableOption "RSS-Bridge service";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.murmur = {
|
||||||
|
enable = true;
|
||||||
|
# TODO enable in 22.11
|
||||||
|
#openFirewall = true;
|
||||||
|
welcometext = "Welcome to the Mumble-Server!";
|
||||||
|
sslCert = "/var/lib/acme/${domain}/fullchain.pem";
|
||||||
|
sslKey = "/var/lib/acme/${domain}/key.pem";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts.${domain}.enableACME = true;
|
||||||
|
security.acme.certs."${domain}" = {
|
||||||
|
group = "voice-buehler-rocks";
|
||||||
|
postRun = ''
|
||||||
|
if ${pkgs.systemd}/bin/systemctl is-active murmur.service; then
|
||||||
|
${pkgs.systemd}/bin/systemctl kill -s SIGUSR1 murmur.service
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
users.groups."voice-buehler-rocks".members = [ "murmur" "nginx" ];
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ config.services.murmur.port ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ config.services.murmur.port ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,26 +0,0 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
services.murmur = {
|
|
||||||
enable = true;
|
|
||||||
# TODO enable in 22.11
|
|
||||||
#openFirewall = true;
|
|
||||||
welcometext = "Welcome to the Mumble-Server!";
|
|
||||||
sslCert = "/var/lib/acme/voice.buehler.rocks/fullchain.pem";
|
|
||||||
sslKey = "/var/lib/acme/voice.buehler.rocks/key.pem";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx.virtualHosts."voice.buehler.rocks".enableACME = true;
|
|
||||||
security.acme.certs."voice.buehler.rocks" = {
|
|
||||||
group = "voice-buehler-rocks";
|
|
||||||
postRun = ''
|
|
||||||
if ${pkgs.systemd}/bin/systemctl is-active murmur.service; then
|
|
||||||
${pkgs.systemd}/bin/systemctl kill -s SIGUSR1 murmur.service
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
users.groups."voice-buehler-rocks".members = [ "murmur" "nginx" ];
|
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ config.services.murmur.port ];
|
|
||||||
networking.firewall.allowedUDPPorts = [ config.services.murmur.port ];
|
|
||||||
}
|
|
|
@ -10,7 +10,6 @@
|
||||||
../modules/compression.nix
|
../modules/compression.nix
|
||||||
../modules/docker.nix
|
../modules/docker.nix
|
||||||
../modules/networkdecrypt.nix
|
../modules/networkdecrypt.nix
|
||||||
../modules/service/mumble-server.nix
|
|
||||||
../modules/nix.nix
|
../modules/nix.nix
|
||||||
../modules/ssh.nix
|
../modules/ssh.nix
|
||||||
../modules/users.nix
|
../modules/users.nix
|
||||||
|
|
|
@ -8,5 +8,7 @@ in
|
||||||
my.services = {
|
my.services = {
|
||||||
# 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;
|
||||||
|
# Voice-chat server
|
||||||
|
mumble-server.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue