huge change
This commit is contained in:
parent
c159d2f3e3
commit
d86cc3c816
29 changed files with 1151 additions and 792 deletions
47
moduler/services/kanboard/default.nix
Normal file
47
moduler/services/kanboard/default.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
{
|
||||
options = {
|
||||
kanboard = {
|
||||
enable = mkEnableOption "enables kanboard";
|
||||
port = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = 3128;
|
||||
description = "The port kanboard listens on.";
|
||||
};
|
||||
host = mkOption {
|
||||
type = types.str;
|
||||
defaultText = literalExpression "127.0.0.1";
|
||||
description = "The hostname that kanboard binds to";
|
||||
};
|
||||
domain = mkOption {
|
||||
type = types.str;
|
||||
defaultText = literalExpression "home.wastring.com";
|
||||
description = "The hostname that kanboard binds to";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = mkMerge [
|
||||
(mkIf config.kanboard.enable {
|
||||
services.kanboard = {
|
||||
enable = true;
|
||||
domain = config.kanboard.domain;
|
||||
nginx = null;
|
||||
};
|
||||
services.nginx.virtualHosts.${config.kanboard.domain} = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://${toString config.kanboard.host}:${toString config.kanboard.port}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue