Compare commits

...

2 Commits

2 changed files with 10 additions and 8 deletions

View File

@ -199,8 +199,8 @@
{
datastore = "plugin";
plugin = "${pkgs.glauth-sqlite}/bin/sqlite.so";
pluginhandler = "NewSqliteHandler";
database = "/run/glauth/glauth.db";
pluginhandler = "NewSQLiteHandler";
database = "/var/lib/glauth/users.db";
}
];
api = {
@ -506,11 +506,7 @@
'';
virtualHosts."dex.samsehu.perli.casa".extraConfig = ''
@connected_via_tailscale remote_ip 100.64.0.0/10 fd7a:115c:a1e0::/48
handle @connected_via_tailscale {
reverse_proxy localhost:5556
}
respond 403
reverse_proxy localhost:5556
'';
virtualHosts."kavita.samsehu.perli.casa".extraConfig = ''

View File

@ -19,6 +19,11 @@ with lib;
package = mkPackageOption pkgs "glauth" { };
dataDir = mkOption {
type = types.path;
default = "/var/lib/glauth";
};
user = mkOption {
default = "glauth";
type = types.str;
@ -53,7 +58,7 @@ with lib;
users.users."${cfg.user}" = {
isSystemUser = true;
group = cfg.group;
home = "/var/empty";
home = cfg.dataDir;
};
users.groups."${cfg.group}" = {};
@ -67,6 +72,7 @@ with lib;
User = "${cfg.user}";
Group = "${cfg.group}";
ExecStart = ''${cfg.package}/bin/glauth -c ${settingsFormat.generate "glauth.cfg" cfg.settings}'';
StateDirectory = mkIf (cfg.dataDir == "/var/lib/glauth") [ "glauth" ];
};
};
};