diff options
author | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2022-05-12 00:26:50 +0900 |
---|---|---|
committer | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2022-05-12 00:26:50 +0900 |
commit | 9d80f26bcbf2150e31a3b626d28cf7fc6a878c82 (patch) | |
tree | 9eee0a36785a02c7b0e4c3c74a40169fb3cccdc8 | |
parent | 84835e036491e99222d95a2ce730b355acf3c9b4 (diff) | |
download | nixos-conf-9d80f26bcbf2150e31a3b626d28cf7fc6a878c82.tar.gz |
Clean up static config a bit
-rw-r--r-- | configuration.nix | 12 |
1 files 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 |