Move social media hosts into their own option

This commit is contained in:
Jimbo 2025-01-10 14:12:33 -05:00
parent 1a83d6b195
commit dc3d5381c5
6 changed files with 14 additions and 10 deletions

View file

@ -19,6 +19,7 @@
system = {
desktop.enable = false;
server.enable = true;
socials.enable = true;
wireless.enable = false;
wireguard.server.enable = true;
stateVersion = "24.05";

View file

@ -1,11 +1,9 @@
{ lib, ... }:
{
options.system.mailserver = {
enable = lib.mkOption {
options.system.mailserver.enable = lib.mkOption {
type = lib.types.bool;
default = false;
};
};
imports = [
./simplenix

View file

@ -1,5 +1,10 @@
{ ... }:
{ lib, ... }:
{
options.system.socials.enable = lib.mkOption {
type = lib.types.bool;
default = false;
};
imports = [
./mastodon
./matrix

View file

@ -1,8 +1,8 @@
{ pkgs, config, ... }:
{
services.mastodon = {
enable = config.system.server.enable;
localDomain = "social.${config.domains.p1}";
enable = config.system.socials.enable;
localDomain = "social.${config.domains.p2}";
streamingProcesses = 4;
configureNginx = true;
smtp = {

View file

@ -5,7 +5,7 @@
];
services.matrix-synapse = {
enable = config.system.server.enable;
enable = config.system.socials.enable;
settings = {
server_name = "${config.domains.p1}";
public_baseurl = "https://matrix.${config.domains.p1}";

View file

@ -3,7 +3,7 @@
imports = [ ./nginx ];
services.owncast = {
enable = config.system.server.enable;
enable = config.system.socials.enable;
port = 8060;
rtmp-port = 1945;
listen = "0.0.0.0";