From 024331fd1b5436a143710d6bad30a66a65b689c6 Mon Sep 17 00:00:00 2001 From: prescientmoon Date: Sat, 24 Feb 2024 01:55:05 +0100 Subject: [PATCH] Set up actual on lapetus --- hosts/nixos/lapetus/default.nix | 1 + hosts/nixos/lapetus/services/actual.nix | 21 ++++++++++++++++++++ hosts/nixos/lapetus/services/vaultwarden.nix | 2 ++ 3 files changed, 24 insertions(+) create mode 100644 hosts/nixos/lapetus/services/actual.nix diff --git a/hosts/nixos/lapetus/default.nix b/hosts/nixos/lapetus/default.nix index 1463b73..09b6940 100644 --- a/hosts/nixos/lapetus/default.nix +++ b/hosts/nixos/lapetus/default.nix @@ -10,6 +10,7 @@ ./services/intray.nix ./services/smos.nix ./services/vaultwarden.nix + ./services/actual.nix ./services/zfs.nix ./filesystems ./hardware diff --git a/hosts/nixos/lapetus/services/actual.nix b/hosts/nixos/lapetus/services/actual.nix new file mode 100644 index 0000000..3f38fda --- /dev/null +++ b/hosts/nixos/lapetus/services/actual.nix @@ -0,0 +1,21 @@ +{ config, ... }: +let + port = 8408; + host = "actual.moonythm.dev"; +in +{ + imports = [ ../../common/optional/services/nginx.nix ]; + services.nginx.virtualHosts.${host} = config.satellite.proxy port { }; + + # {{{ General config + virtualisation.oci-containers.containers.actual = { + image = "actualbudget/actual-server:latest"; + autoStart = true; + + ports = [ "${toString port}:5006" ]; # server:docker + volumes = [ "/persist/state/var/lib/actual:/data" ]; # server:docker + + environment = { }; + }; + # }}} +} diff --git a/hosts/nixos/lapetus/services/vaultwarden.nix b/hosts/nixos/lapetus/services/vaultwarden.nix index 0e864ff..d726e31 100644 --- a/hosts/nixos/lapetus/services/vaultwarden.nix +++ b/hosts/nixos/lapetus/services/vaultwarden.nix @@ -4,6 +4,8 @@ let host = "warden.moonythm.dev"; in { + imports = [ ../../common/optional/services/nginx.nix ]; + services.nginx.virtualHosts.${host} = config.satellite.proxy port { proxyWebsockets = true; };