mirror of
https://codeberg.org/jopejoe1/nix-conf.git
synced 2025-04-18 19:24:09 +02:00
enable mastodon
This commit is contained in:
parent
ead0fcea69
commit
6963d78461
1 changed files with 35 additions and 8 deletions
|
@ -95,19 +95,22 @@ in
|
|||
chrootlocalUser = true;
|
||||
};
|
||||
|
||||
services.mastodon = {
|
||||
enable = false;
|
||||
streamingProcesses = (lib.elemAt config.facter.report.hardware.cpu 0).cores - 1;
|
||||
localDomain = "nyan.social";
|
||||
smtp.fromAddress = "mastodon@nyan.social";
|
||||
configureNginx = true;
|
||||
};
|
||||
|
||||
users.users.backupftp = {
|
||||
isNormalUser = true;
|
||||
initialPassword = "backupPassword";
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
virtualHosts."${config.containers.nyan.config.services.mastodon.localDomain}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://192.168.100.5";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
containers = {
|
||||
nyan = {
|
||||
privateNetwork = true;
|
||||
|
@ -115,6 +118,30 @@ in
|
|||
localAddress = "192.168.100.5/24";
|
||||
config = {
|
||||
system.stateVersion = "25.05";
|
||||
services.mastodon = {
|
||||
enable = true;
|
||||
streamingProcesses = (lib.elemAt config.facter.report.hardware.cpu 0).cores - 1;
|
||||
localDomain = "nyan.social";
|
||||
smtp.fromAddress = "mastodon@nyan.social";
|
||||
configureNginx = true;
|
||||
};
|
||||
services.nginx = {
|
||||
virtualHosts."${config.containers.nyan.config.services.mastodon.localDomain}" = {
|
||||
forceSSL = false;
|
||||
enableACME = false;
|
||||
};
|
||||
};
|
||||
networking = {
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [
|
||||
80
|
||||
];
|
||||
allowedUDPPorts = [
|
||||
80
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue