tailproxy @main -
refs -
log -
-
https://git.jolheiser.com/tailproxy.git
Signature
-----BEGIN SSH SIGNATURE-----
U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgBTEvCQk6VqUAdN2RuH6bj1dNkY
oOpbPWj+jw4ua1B1cAAAADZ2l0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5
AAAAQGlqVnvtnoddxxxfa3Pmd/grph4le3cixHSb6R89sytR3+Tq+eoge8rJveQfrKi+Ao
CDE4X89aLUxoQr2KHlDgk=
-----END SSH SIGNATURE-----
diff --git a/nix/module.nix b/nix/module.nix
index 8854312edf648e59770f86544af9c79d12cc5d43..9c4c19ef72266c9f78cc82e054320650e0f6e95a 100644
--- a/nix/module.nix
+++ b/nix/module.nix
@@ -71,7 +71,7 @@ default = { };
description = "Attribute set of tailproxy instances";
};
};
- config = lib.mkIf (cfg.instances != { }) {
+ config = lib.mkIf (cfg != { }) {
systemd.services = lib.mapAttrs' (
name: instanceCfg:
lib.nameValuePair "tailproxy-${name}" {
@@ -97,8 +97,8 @@ User = instanceCfg.user;
Restart = "on-failure";
};
}
-let
pkg = pkgs.callPackage ./pkg.nix { inherit pkgs; };
+{
users.users = lib.mapAttrs' (
name: instanceCfg:
@@ -108,11 +108,11 @@ group = instanceCfg.user;
home = instanceCfg.dataDir;
createHome = true;
}
-let
pkg = pkgs.callPackage ./pkg.nix { inherit pkgs; };
+{
users.groups = lib.mapAttrs' (name: instanceCfg: lib.nameValuePair instanceCfg.user { }) (
- lib.filterAttrs (name: instanceCfg: instanceCfg.enable) cfg.instances
+ lib.filterAttrs (name: instanceCfg: instanceCfg.enable) cfg
);
};
}