diff options
-rw-r--r-- | configuration.nix | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/configuration.nix b/configuration.nix index a479d41..0fa2b44 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,21 +1,22 @@ { config, lib, pkgs, ... }: let domain = "loang.net"; + bindUserDirs = sources: target: lib.mapAttrs' (user: dir: { + name = "${target}/~${user}"; + value = { + device = "${config.users.users.${user}.home}/${dir}"; + options = [ "bind" ]; + }; + }) sources; in { environment = { enableAllTerminfo = true; systemPackages = with pkgs; [ git rsync vim ]; }; - fileSystems = lib.mapAttrs' (user: dir: { - name = "/var/www/${domain}/~${user}"; - value = { - device = "${config.users.users.${user}.home}/${dir}"; - options = [ "bind" ]; - }; - }) { + fileSystems = bindUserDirs { cnx = "www"; - }; + } config.services.nginx.virtualHosts.${domain}.root; imports = [ ./vpsadminos.nix ]; |