diff --git a/modules/system/cloudreve.nix b/modules/system/cloudreve.nix new file mode 100644 index 0000000..a85f797 --- /dev/null +++ b/modules/system/cloudreve.nix @@ -0,0 +1,21 @@ +{ config, lib, pkgs, configPath, ... }: + +with lib; + +{ + options.myModules.cloudreve.enable = mkEnableOption "custom cloudreve configuration"; + + config = mkIf config.myModules.cloudreve.enable { + virtualisation.oci-containers.containers.cloudreve = { + environment = { + "CR_CONF_Database.Type" = "postgres"; + "CR_CONF_Database.DatabaseURL" = "postgresql:///cloudreve?host=/run/postgresql/&user=cloudreve"; + }; + image = "cloudreve.azurecr.io/cloudreve/pro:4.3.0 + ports = [ "127.0.0.1:10040:5212" ]; + volumes = [ + "/var/lib/cloudreve:/cloudreve/data" + ]; + }; + }; +} diff --git a/modules/system/default.nix b/modules/system/default.nix index f3ac202..258010d 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -5,6 +5,7 @@ ./caddy.nix ./cloud-init.nix ./collabora.nix + ./cloudreve.nix ./do-agent.nix ./element-web.nix ./fish.nix