This commit is contained in:
Taeer Bar-Yam 2024-07-25 06:06:02 -04:00
parent acc4a1a2ef
commit bddfd95ee4
3 changed files with 3 additions and 12 deletions

1
.gitignore vendored
View file

@ -2,4 +2,5 @@ nixos.qcow2
result* result*
.direnv .direnv
.nixos-test-history .nixos-test-history
mastodon-screenshot.png

View file

@ -46,8 +46,6 @@ in
# by default it tries to use "<S3_HOSTNAME>/<S3_BUCKET>" # by default it tries to use "<S3_HOSTNAME>/<S3_BUCKET>"
# but we want "<S3_BUCKET>.<S3_HOSTNAME>" # but we want "<S3_BUCKET>.<S3_HOSTNAME>"
S3_ALIAS_HOST = "mastodon.web.garage.localhost:3902"; S3_ALIAS_HOST = "mastodon.web.garage.localhost:3902";
# XXX: I think we need to set up a proper CDN host
# CDN_HOST = "mastodon.web.garage.localhost:3902";
# SEE: the last section in https://docs.joinmastodon.org/admin/optional/object-storage/ # SEE: the last section in https://docs.joinmastodon.org/admin/optional/object-storage/
# TODO: can we set up ACLs with garage? # TODO: can we set up ACLs with garage?
S3_PERMISSION = ""; S3_PERMISSION = "";
@ -80,6 +78,7 @@ in
# defaults.email = "test@example.com"; # defaults.email = "test@example.com";
}; };
} }
# VM setup # VM setup
{ {
services.mastodon = { services.mastodon = {
@ -119,7 +118,7 @@ in
]; ];
} }
# mastodon development environment # run mastodon as development environment
{ {
networking.firewall.allowedTCPPorts = [ 55001 ]; networking.firewall.allowedTCPPorts = [ 55001 ];
services.mastodon = { services.mastodon = {
@ -135,12 +134,6 @@ in
LOCAL_DOMAIN = "mastodon.localhost:8443"; LOCAL_DOMAIN = "mastodon.localhost:8443";
}; };
}; };
# services.nginx.virtualHosts."${config.services.mastodon.localDomain}" = {
# extraConfig = ''
# add_header Content-Security-Policy 'base-uri 'none'; default-src 'none'; frame-ancestors 'none'; font-src 'self' http://mastodon.localhost:8443; img-src * https: data: blob: http://mastodon.localhost:8443; style-src 'self' http://mastodon.localhost:8443 'nonce-QvwdQ3lNRMmEcQnhZ22MAg=='; media-src 'self' https: data: http://mastodon.localhost:8443; frame-src 'self' https:; manifest-src 'self' http://mastodon.localhost:8443; form-action 'self'; child-src 'self' blob: http://mastodon.localhost:8443; worker-src 'self' blob: http://mastodon.localhost:8443; connect-src 'self' data: blob: http://mastodon.localhost:8443 http://mastodon.web.garage.localhost:3902 ws://mastodon.localhost:4000 ws://localhost:3035 http://localhost:3035; script-src 'self' 'unsafe-inline' 'unsafe-eval' http://mastodon.localhost:8443'
# '';
# };
# services.nginx.virtualHosts."${config.services.mastodon.localDomain}".locations."/sw.js" =
services.postgresql = { services.postgresql = {
enable = true; enable = true;

View file

@ -36,9 +36,6 @@ in
rebuildableTest { rebuildableTest {
name = "test-mastodon-garage"; name = "test-mastodon-garage";
# skipLint = true;
# skipTypeCheck = true;
nodes = { nodes = {
server = {config, ...}: { server = {config, ...}: {
virtualisation.memorySize = lib.mkVMOverride 4096; virtualisation.memorySize = lib.mkVMOverride 4096;