forked from fabian/nix
vps: move to trivionomicon soju config
This commit is contained in:
parent
3c2ef85b93
commit
8a7118cea7
3 changed files with 6 additions and 46 deletions
|
@ -17,6 +17,12 @@ with lib; {
|
||||||
./networkMap.nix
|
./networkMap.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
local.soju = {
|
||||||
|
enable = true;
|
||||||
|
fullyQualifiedDomain = "soju.posixlycorrect.com";
|
||||||
|
};
|
||||||
|
|
||||||
local.sys = {
|
local.sys = {
|
||||||
baseline.enable = true;
|
baseline.enable = true;
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,5 @@ with lib; {
|
||||||
./immich.nix
|
./immich.nix
|
||||||
./mealie.nix
|
./mealie.nix
|
||||||
./dufs.nix
|
./dufs.nix
|
||||||
./soju.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,45 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib; {
|
|
||||||
security.acme.certs."soju.posixlycorrect.com" = {
|
|
||||||
reloadServices = ["soju.service"];
|
|
||||||
group = "soju";
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [6697];
|
|
||||||
|
|
||||||
services.soju = let
|
|
||||||
sojuCertDir = config.security.acme.certs."soju.posixlycorrect.com".directory;
|
|
||||||
in {
|
|
||||||
enable = true;
|
|
||||||
hostName = "soju.posixlycorrect.com";
|
|
||||||
listen = ["ircs://[::]:6697"];
|
|
||||||
tlsCertificate = "${sojuCertDir}/fullchain.pem";
|
|
||||||
tlsCertificateKey = "${sojuCertDir}/key.pem";
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services.soju = {
|
|
||||||
after = ["acme-soju.posixlycorrect.com.service"];
|
|
||||||
serviceConfig = {
|
|
||||||
DynamicUser = mkForce false; # fuck dynamic users
|
|
||||||
User = "soju";
|
|
||||||
Group = "soju";
|
|
||||||
ProtectSystem = "strict";
|
|
||||||
ProtectHome = "read-only";
|
|
||||||
PrivateTmp = true;
|
|
||||||
RemoveIPC = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
users = {
|
|
||||||
users.soju = {
|
|
||||||
isSystemUser = true;
|
|
||||||
group = "soju";
|
|
||||||
};
|
|
||||||
groups.soju = {};
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue