configure domain in a central file
This commit is contained in:
parent
865e1251de
commit
d459fa895e
8 changed files with 52 additions and 30 deletions
|
@ -1,13 +1,15 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.nginx.virtualHosts."fricloud.dk" = {
|
||||
let
|
||||
svc_domain = config.mine.settings.domain;
|
||||
in {
|
||||
services.nginx.virtualHosts."${svc_domain}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
root = pkgs.writeTextDir "index.html" ''
|
||||
<html>
|
||||
<head>
|
||||
<title>Fricloud.dk</title>
|
||||
<title>${svc_domain}</title>
|
||||
</head>
|
||||
<body>
|
||||
<marquee
|
||||
|
@ -21,7 +23,7 @@
|
|||
};
|
||||
|
||||
# setup group for fricloud.dk cert + add nginx to group.
|
||||
# group `fricloud-domain` is used for users that need access to the domain certificate, e.g. murmur
|
||||
security.acme.certs."fricloud.dk".group = config.users.groups.fricloud-domain.name;
|
||||
users.groups.fricloud-domain.members = [ config.users.users.nginx.name ];
|
||||
# group `main-domain` is used for users that need access to the domain certificate, e.g. murmur
|
||||
security.acme.certs."${svc_domain}".group = config.users.groups.main-domain.name;
|
||||
users.groups.main-domain.members = [ config.users.users.nginx.name ];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue