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 = { system = {
desktop.enable = false; desktop.enable = false;
server.enable = true; server.enable = true;
socials.enable = true;
wireless.enable = false; wireless.enable = false;
wireguard.server.enable = true; wireguard.server.enable = true;
stateVersion = "24.05"; stateVersion = "24.05";

View file

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

View file

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

View file

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

View file

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

View file

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