From 9d80f26bcbf2150e31a3b626d28cf7fc6a878c82 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Thu, 12 May 2022 00:26:50 +0900 Subject: Clean up static config a bit --- configuration.nix | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/configuration.nix b/configuration.nix index 188ec12..9dc0a48 100644 --- a/configuration.nix +++ b/configuration.nix @@ -3,7 +3,7 @@ let certs = config.security.acme.certs.${domain}; domain = "loang.net"; bindUserDirs = sources: target: lib.mapAttrs' (user: dir: { - name = "${target}/~${user}"; + name = target + user; value = { device = "${config.users.users.${user}.home}/${dir}"; options = [ "bind" ]; @@ -17,7 +17,7 @@ in { fileSystems = bindUserDirs { cnx = "www"; - } config.services.nginx.virtualHosts.${domain}.root; + } "${config.services.nginx.virtualHosts.${domain}.root}/~"; imports = [ ./vpsadminos.nix ]; @@ -78,14 +78,12 @@ in { }; }; - molly-brown = let - certDir = certs.directory; - in { - certPath = "${certDir}/cert.pem"; + molly-brown = { + certPath = "${certs.directory}/cert.pem"; docBase = "/var/lib/gemini/${domain}"; enable = true; hostName = domain; - keyPath = "${certDir}/key.pem"; + keyPath = "${certs.directory}/key.pem"; }; nginx = let -- cgit 1.4.1