diff options
| author | Christian Krinitsin <mail@krinitsin.com> | 2025-04-24 12:47:53 +0200 |
|---|---|---|
| committer | Christian Krinitsin <mail@krinitsin.com> | 2025-04-24 12:47:53 +0200 |
| commit | 9c53fee88e928494c6b150a8b281ba517349c712 (patch) | |
| tree | 5590b5553524892df0428dcb1123c3bc09ec03eb | |
| parent | b93fc1d7a5bc15bdeb3f6fe1899f46db4dcc4de2 (diff) | |
| download | nosix-9c53fee88e928494c6b150a8b281ba517349c712.tar.gz nosix-9c53fee88e928494c6b150a8b281ba517349c712.zip | |
enable silverbullet as a docker container
| -rw-r--r-- | configuration.nix | 2 | ||||
| -rw-r--r-- | modules/silverbullet.nix | 17 |
2 files changed, 11 insertions, 8 deletions
diff --git a/configuration.nix b/configuration.nix index 7f55737..9f170b0 100644 --- a/configuration.nix +++ b/configuration.nix @@ -19,7 +19,7 @@ ./modules/vaultwarden.nix ./modules/pdf.nix ./modules/atuin.nix - #./modules/silverbullet.nix Commented out: silverbullet 0.9 doesn't work with deno 2+ + ./modules/silverbullet.nix ./modules/monit.nix ./modules/shopping-list.nix ./modules/glance.nix diff --git a/modules/silverbullet.nix b/modules/silverbullet.nix index ffdc59a..8dbdab7 100644 --- a/modules/silverbullet.nix +++ b/modules/silverbullet.nix @@ -1,11 +1,16 @@ { pkgs, libs, config, ... }: { - services.silverbullet = { - enable = true; - listenPort = 3000; - listenAddress = "localhost"; - envFile = "/secret/silverbullet.env"; + virtualisation.docker.enable = true; + + virtualisation.oci-containers = { + backend = "docker"; + containers."silverbullet" = { + image = "ghcr.io/silverbulletmd/silverbullet:v2"; + ports = [ "127.0.0.1:3000:3000" ]; + volumes = [ "/var/lib/silverbullet:/space" ]; + environmentFiles = [ "/secret/silverbullet.env" ]; + }; }; services.nginx.virtualHosts."notes.krinitsin.com" = { @@ -16,8 +21,6 @@ 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" |