[durutti] expose nixosModule for configuring host of durruti

This commit is contained in:
2023-05-17 12:08:51 +02:00
parent 898217b827
commit 0bad160379
2 changed files with 44 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
{ config, lib, options, pkgs, ... }:
with lib;
let
cfg = config.services.malobeo;
{
options = {
services.malobeo = {
enable = mkOption {
default = false;
type = types.bool;
description = lib.mdDoc "Enable malobeo infrastructure.";
};
host_ip = mkOption {
type = types.str;
default = "";
description = lib.mdDoc "ip of nix container provided for malo";
};
};
};
config = mkIf cfg.enable
{
assertions = [
{
assertion = cfg.host_ip == "";
message = ''
You need to specify host_ip of the nix container
'';
}
];
services.nginx.virtualHosts."tasklist.malobeo.org" = {
forceSSL = true;
enableACME= true;
locations."/".proxyPass = "http://10.233.1.2:8080"
};
};
}