diff options
| author | Christian Krinitsin <code@krinitsin.xyz> | 2025-04-02 09:03:03 +0200 |
|---|---|---|
| committer | Christian Krinitsin <code@krinitsin.xyz> | 2025-04-02 09:03:03 +0200 |
| commit | bacd7411c549623b11426fc43ee3a81bb45f14f7 (patch) | |
| tree | a3f149dd29f92e28a1a8f3faa9e6c3b7c7c4ee2e | |
| parent | fb6c96099b917e5e1956aac54a107caddb9b845e (diff) | |
| download | nosix-bacd7411c549623b11426fc43ee3a81bb45f14f7.tar.gz nosix-bacd7411c549623b11426fc43ee3a81bb45f14f7.zip | |
add (not enabled) silverbullet
| -rw-r--r-- | configuration.nix | 1 | ||||
| -rw-r--r-- | modules/silverbullet.nix | 27 |
2 files changed, 28 insertions, 0 deletions
diff --git a/configuration.nix b/configuration.nix index 2a40a44..9a98194 100644 --- a/configuration.nix +++ b/configuration.nix @@ -14,6 +14,7 @@ ./modules/polaris.nix ./modules/caldav.nix ./modules/vaultwarden.nix + #./modules/silverbullet.nix Commented out: silverbullet 0.9 doesn't work with deno 2+ ./modules/monit.nix ]; diff --git a/modules/silverbullet.nix b/modules/silverbullet.nix new file mode 100644 index 0000000..ffdc59a --- /dev/null +++ b/modules/silverbullet.nix @@ -0,0 +1,27 @@ +{ pkgs, libs, config, ... }: +{ + + services.silverbullet = { + enable = true; + listenPort = 3000; + listenAddress = "localhost"; + envFile = "/secret/silverbullet.env"; + }; + + services.nginx.virtualHosts."notes.krinitsin.com" = { + forceSSL = true; + useACMEHost = "krinitsin.com"; + locations."/".proxyPass = "http://localhost:3000"; + }; + + security.acme.certs."krinitsin.com".extraDomainNames = [ "notes.krinitsin.com" ]; + + networking.firewall.allowedTCPPorts = [ 3000 ]; + + services.monit.config = '' + check process silverbullet with matching "silverbullet" + start program = "${pkgs.systemd}/bin/systemctl start silverbullet" + stop program = "${pkgs.systemd}/bin/systemctl stop silverbullet" + ''; + +} |