Camelot: add GoToSocial instance
This commit is contained in:
parent
22c0117beb
commit
1d00aacc8b
|
@ -42,13 +42,23 @@
|
||||||
./jellyfin.nix
|
./jellyfin.nix
|
||||||
./wireguard.nix
|
./wireguard.nix
|
||||||
./nextcloud.nix
|
./nextcloud.nix
|
||||||
|
./gotosocial.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
swapDeviceUUID = "a7c628ab-c5cb-4094-89d0-19b153fbead4";
|
swapDeviceUUID = "a7c628ab-c5cb-4094-89d0-19b153fbead4";
|
||||||
|
|
||||||
server.networking.enableSSH = true;
|
server.networking.enableSSH = true;
|
||||||
|
|
||||||
services.nginx.enable = true;
|
services.nginx = {
|
||||||
|
enable = true;
|
||||||
|
clientMaxBodySize = "40m";
|
||||||
|
|
||||||
|
virtualHosts."dalaran.fr" = {
|
||||||
|
default = true;
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
neovim
|
neovim
|
||||||
|
|
47
configurations/camelot/gotosocial.nix
Normal file
47
configurations/camelot/gotosocial.nix
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
{ config, ... }:
|
||||||
|
let
|
||||||
|
wellKnownLocations = [
|
||||||
|
"/.well-known/webfinger"
|
||||||
|
"/.well-known/host-meta"
|
||||||
|
"/.well-known/nodeinfo"
|
||||||
|
];
|
||||||
|
gtsConfig = config.services.gotosocial.settings;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.gotosocial = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
setupPostgresqlDB = true;
|
||||||
|
settings = {
|
||||||
|
applications-name = "Dala's personnal instance";
|
||||||
|
host = "gts.dalaran.fr";
|
||||||
|
account-domain = "dalaran.fr";
|
||||||
|
bind-address = "localhost";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts = {
|
||||||
|
"dalaran.fr".locations = builtins.listToAttrs (
|
||||||
|
map (location: {
|
||||||
|
name = location;
|
||||||
|
value.return = "301 https://gts.dalaran.fr$request_uri";
|
||||||
|
}) wellKnownLocations
|
||||||
|
);
|
||||||
|
|
||||||
|
"gts.dalaran.fr" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://${gtsConfig.bind-address}:${builtins.toString gtsConfig.port}";
|
||||||
|
extraConfig = ''
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -2,7 +2,8 @@
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
host = extraInfo.woodpeckerURI;
|
host = extraInfo.woodpeckerURI;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.server.build.enable = mkOption {
|
options.server.build.enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
|
|
Loading…
Reference in a new issue