From bddfd95ee4b9fb96588c5abb60f80011f12d7367 Mon Sep 17 00:00:00 2001 From: Taeer Bar-Yam Date: Thu, 25 Jul 2024 06:06:02 -0400 Subject: [PATCH] cleanup --- .gitignore | 1 + mastodon.nix | 11 ++--------- tests/mastodon-garage.nix | 3 --- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index e83c5f0..2cb15d6 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ nixos.qcow2 result* .direnv .nixos-test-history +mastodon-screenshot.png diff --git a/mastodon.nix b/mastodon.nix index 5527949..facda0e 100644 --- a/mastodon.nix +++ b/mastodon.nix @@ -46,8 +46,6 @@ in # by default it tries to use "/" # but we want "." 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/ # TODO: can we set up ACLs with garage? S3_PERMISSION = ""; @@ -80,6 +78,7 @@ in # defaults.email = "test@example.com"; }; } + # VM setup { services.mastodon = { @@ -119,7 +118,7 @@ in ]; } - # mastodon development environment + # run mastodon as development environment { networking.firewall.allowedTCPPorts = [ 55001 ]; services.mastodon = { @@ -135,12 +134,6 @@ in 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 = { enable = true; diff --git a/tests/mastodon-garage.nix b/tests/mastodon-garage.nix index ed59b75..f40d1ce 100644 --- a/tests/mastodon-garage.nix +++ b/tests/mastodon-garage.nix @@ -36,9 +36,6 @@ in rebuildableTest { name = "test-mastodon-garage"; - # skipLint = true; - # skipTypeCheck = true; - nodes = { server = {config, ...}: { virtualisation.memorySize = lib.mkVMOverride 4096;