mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 13:46:59 +01:00
20 lines
541 B
Nix
20 lines
541 B
Nix
|
|
{ config, lib, pkgs, ... }:
|
||
|
|
let
|
||
|
|
configureWiki = name: {
|
||
|
|
services.dokuwiki.sites = {
|
||
|
|
"${name}.${config.networking.domain}" = {
|
||
|
|
enable = true;
|
||
|
|
stateDir = "/nix/var/data/dokuwiki/${name}/data";
|
||
|
|
};
|
||
|
|
};
|
||
|
|
|
||
|
|
services.phpfpm.pools."dokuwiki-${name}.${config.networking.domain}".phpPackage = lib.mkOverride 10 pkgs.php74;
|
||
|
|
|
||
|
|
services.nginx.virtualHosts."${name}.${config.networking.domain}" = {
|
||
|
|
forceSSL = true;
|
||
|
|
enableACME = true;
|
||
|
|
};
|
||
|
|
};
|
||
|
|
in
|
||
|
|
configureWiki "anderia" // configureWiki "arkadia"
|