[durutti] expose nixosModule for configuring host of durruti
This commit is contained in:
42
machines/durruti/host_config.nix
Normal file
42
machines/durruti/host_config.nix
Normal 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"
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user