Infini-DL360/hedgedoc: init
This commit is contained in:
parent
0a3d4f54b3
commit
98239c4cba
5 changed files with 37 additions and 0 deletions
|
@ -10,6 +10,7 @@
|
||||||
./factorio.nix
|
./factorio.nix
|
||||||
./forgejo.nix
|
./forgejo.nix
|
||||||
./freshrss.nix
|
./freshrss.nix
|
||||||
|
./hedgedoc.nix
|
||||||
./hydra.nix
|
./hydra.nix
|
||||||
./jellyfin.nix
|
./jellyfin.nix
|
||||||
./jupyter.nix
|
./jupyter.nix
|
||||||
|
|
32
hosts/Infini-DL360/hedgedoc.nix
Normal file
32
hosts/Infini-DL360/hedgedoc.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{ config, common, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.services.hedgedoc;
|
||||||
|
domain = common.subdomain "md";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.hedgedoc = {
|
||||||
|
enable = true;
|
||||||
|
environmentFile = config.secrets."hedgedoc";
|
||||||
|
settings = {
|
||||||
|
inherit domain;
|
||||||
|
protocolUseSSL = true;
|
||||||
|
port = 3003;
|
||||||
|
|
||||||
|
db = { dialect = "sqlite"; storage = "/srv/hedgedoc/db.sqlite"; };
|
||||||
|
uploadsPath = "/srv/hedgedoc/uploads";
|
||||||
|
|
||||||
|
allowFreeURL = true;
|
||||||
|
requireFreeURLAuthentication = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts.${domain} = common.nginx.ssl // {
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://${cfg.settings.host}:${toString cfg.settings.port}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.hedgedoc.serviceConfig = {
|
||||||
|
ReadWritePaths = [ "-/srv/hedgedoc" ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -47,6 +47,9 @@ in
|
||||||
(mkIf config.services.hydra.enable {
|
(mkIf config.services.hydra.enable {
|
||||||
inherit (secrets) hydra;
|
inherit (secrets) hydra;
|
||||||
})
|
})
|
||||||
|
(mkIf config.services.hedgedoc.enable {
|
||||||
|
"hedgedoc" = withOwnerGroup "hedgedoc" secrets."hedgedoc";
|
||||||
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
BIN
secrets/hedgedoc.age
Normal file
BIN
secrets/hedgedoc.age
Normal file
Binary file not shown.
|
@ -36,4 +36,5 @@ in
|
||||||
"cloudflare.age".publicKeys = allKeys;
|
"cloudflare.age".publicKeys = allKeys;
|
||||||
"smtp-password.age".publicKeys = allKeys;
|
"smtp-password.age".publicKeys = allKeys;
|
||||||
"hydra.age".publicKeys = allKeys;
|
"hydra.age".publicKeys = allKeys;
|
||||||
|
"hedgedoc.age".publicKeys = allKeys;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue