mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-04-02 02:00:51 +02:00
Compare commits
No commits in common. "10f670ff7b338ac9c2970d16bdba1ecff75959e6" and "fdada747e18288c69a6a9c71f4a8b6c0df455f1e" have entirely different histories.
10f670ff7b
...
fdada747e1
5 changed files with 48 additions and 7 deletions
|
@ -53,7 +53,7 @@ in
|
||||||
services.nginx.virtualHosts."cdn.luj.fr" = {
|
services.nginx.virtualHosts."cdn.luj.fr" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
serverAliases = [ "luj.fr" ];
|
serverAliases = [ "cdn.social.luj.fr" ];
|
||||||
locations."/".extraConfig = ''
|
locations."/".extraConfig = ''
|
||||||
proxy_pass http://127.0.0.1:3902;
|
proxy_pass http://127.0.0.1:3902;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
@ -61,10 +61,10 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
machine.meta.zones."luj.fr".A = [
|
machine.meta.zones."luj.fr".subdomains."social".subdomains."cdn".A = [
|
||||||
config.machine.meta.ips.public.ipv4
|
config.machine.meta.ips.public.ipv4
|
||||||
];
|
];
|
||||||
machine.meta.zones."luj.fr".AAAA = [
|
machine.meta.zones."luj.fr".subdomains."social".subdomains."cdn".AAAA = [
|
||||||
config.machine.meta.ips.public.ipv6
|
config.machine.meta.ips.public.ipv6
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -11,12 +11,12 @@
|
||||||
./home-julien.nix
|
./home-julien.nix
|
||||||
./nsd.nix
|
./nsd.nix
|
||||||
./borg.nix
|
./borg.nix
|
||||||
# Performance is not as good as we expected, wait for pages v3
|
./pages.nix
|
||||||
# ./pages.nix
|
|
||||||
./readeck.nix
|
./readeck.nix
|
||||||
./plausible.nix
|
./plausible.nix
|
||||||
./nextcloud.nix
|
./nextcloud.nix
|
||||||
./glance.nix
|
./glance.nix
|
||||||
|
./mastodon.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
machine.meta = {
|
machine.meta = {
|
||||||
|
@ -26,7 +26,6 @@
|
||||||
profiles = with profiles; [
|
profiles = with profiles; [
|
||||||
vm-simple-network
|
vm-simple-network
|
||||||
server
|
server
|
||||||
behind-sniproxy
|
|
||||||
];
|
];
|
||||||
ips = {
|
ips = {
|
||||||
public.ipv4 = "82.67.34.230";
|
public.ipv4 = "82.67.34.230";
|
||||||
|
|
41
machines/gustave/mastodon.nix
Normal file
41
machines/gustave/mastodon.nix
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
{ config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
age.secrets."mastodon-env".file = ../../secrets/mastodon-env.age;
|
||||||
|
|
||||||
|
services.mastodon = {
|
||||||
|
enable = true;
|
||||||
|
localDomain = "social.luj.fr";
|
||||||
|
configureNginx = true;
|
||||||
|
extraConfig.SINGLE_USER_MODE = "true";
|
||||||
|
streamingProcesses = 10;
|
||||||
|
extraConfig = {
|
||||||
|
OIDC_ENABLED = "true";
|
||||||
|
OIDC_DISPLAY_NAME = "Luj - SSO";
|
||||||
|
OIDC_DISCOVERY = "true";
|
||||||
|
OIDC_ISSUER = "https://auth.luj.fr/oauth2/openid/mastodon";
|
||||||
|
OIDC_SCOPE = "openid,profile,email";
|
||||||
|
OIDC_UID_FIELD = "email";
|
||||||
|
OIDC_CLIENT_ID = "mastodon";
|
||||||
|
OIDC_REDIRECT_URI = "https://social.luj.fr/auth/auth/openid_connect/callback";
|
||||||
|
OIDC_SECURITY_ASSUME_EMAIL_IS_VERIFIED = "true";
|
||||||
|
ONE_CLICK_SSO_LOGIN = "true";
|
||||||
|
|
||||||
|
# S3
|
||||||
|
S3_ENABLED = "true";
|
||||||
|
S3_BUCKET = "mastodon";
|
||||||
|
S3_REGION = "paris";
|
||||||
|
S3_ENDPOINT = "https://s3.luj.fr";
|
||||||
|
S3_HOSTNAME = "s3.luj.fr";
|
||||||
|
S3_ALIAS_HOST = "cdn.social.luj.fr";
|
||||||
|
SMTP_SERVER = "mail.luj.fr";
|
||||||
|
SMTP_PORT = "587";
|
||||||
|
SMTP_FROM_ADDRESS = "infra@luj.fr";
|
||||||
|
SMTP_LOGIN = "luj";
|
||||||
|
};
|
||||||
|
extraEnvFiles = [ config.age.secrets."mastodon-env".path ];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
|
@ -101,6 +101,8 @@ lib.mkMerge [
|
||||||
networking.firewall.allowedUDPPorts = [ 53 ];
|
networking.firewall.allowedUDPPorts = [ 53 ];
|
||||||
networking.firewall.allowedTCPPorts = [ 53 ];
|
networking.firewall.allowedTCPPorts = [ 53 ];
|
||||||
|
|
||||||
|
machine.meta.zones."luj.fr".A = [ config.machine.meta.ips.public.ipv4 ];
|
||||||
|
machine.meta.zones."luj.fr".AAAA = [ config.machine.meta.ips.public.ipv6 ];
|
||||||
machine.meta.zones."luj.fr".TXT = [ "homepage.luj.luj-static.page" ];
|
machine.meta.zones."luj.fr".TXT = [ "homepage.luj.luj-static.page" ];
|
||||||
|
|
||||||
machine.meta.monitors = {
|
machine.meta.monitors = {
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
bash
|
bash
|
||||||
coreutils
|
coreutils
|
||||||
curl
|
curl
|
||||||
awscli2
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue