mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
freeradius: add option to compile with postgres (#265762)
This commit is contained in:
commit
e8486ebc7f
2 changed files with 9 additions and 3 deletions
|
@ -10,14 +10,14 @@ let
|
||||||
after = ["network.target"];
|
after = ["network.target"];
|
||||||
wants = ["network.target"];
|
wants = ["network.target"];
|
||||||
preStart = ''
|
preStart = ''
|
||||||
${pkgs.freeradius}/bin/radiusd -C -d ${cfg.configDir} -l stdout
|
${cfg.package}/bin/radiusd -C -d ${cfg.configDir} -l stdout
|
||||||
'';
|
'';
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${pkgs.freeradius}/bin/radiusd -f -d ${cfg.configDir} -l stdout" +
|
ExecStart = "${cfg.package}/bin/radiusd -f -d ${cfg.configDir} -l stdout" +
|
||||||
lib.optionalString cfg.debug " -xx";
|
lib.optionalString cfg.debug " -xx";
|
||||||
ExecReload = [
|
ExecReload = [
|
||||||
"${pkgs.freeradius}/bin/radiusd -C -d ${cfg.configDir} -l stdout"
|
"${cfg.package}/bin/radiusd -C -d ${cfg.configDir} -l stdout"
|
||||||
"${pkgs.coreutils}/bin/kill -HUP $MAINPID"
|
"${pkgs.coreutils}/bin/kill -HUP $MAINPID"
|
||||||
];
|
];
|
||||||
User = "radius";
|
User = "radius";
|
||||||
|
@ -32,6 +32,8 @@ let
|
||||||
freeradiusConfig = {
|
freeradiusConfig = {
|
||||||
enable = lib.mkEnableOption "the freeradius server";
|
enable = lib.mkEnableOption "the freeradius server";
|
||||||
|
|
||||||
|
package = lib.mkPackageOption pkgs "freeradius" { };
|
||||||
|
|
||||||
configDir = lib.mkOption {
|
configDir = lib.mkOption {
|
||||||
type = lib.types.path;
|
type = lib.types.path;
|
||||||
default = "/etc/raddb";
|
default = "/etc/raddb";
|
||||||
|
@ -72,7 +74,9 @@ in
|
||||||
/*uid = config.ids.uids.radius;*/
|
/*uid = config.ids.uids.radius;*/
|
||||||
description = "Radius daemon user";
|
description = "Radius daemon user";
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
|
groups = "radius";
|
||||||
};
|
};
|
||||||
|
groups.radius = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.freeradius = freeradiusService cfg;
|
systemd.services.freeradius = freeradiusService cfg;
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
, withLdap ? true, openldap
|
, withLdap ? true, openldap
|
||||||
, withMemcached ? false, libmemcached
|
, withMemcached ? false, libmemcached
|
||||||
, withMysql ? false, libmysqlclient
|
, withMysql ? false, libmysqlclient
|
||||||
|
, withPostgresql ? false, postgresql
|
||||||
, withPcap ? true, libpcap
|
, withPcap ? true, libpcap
|
||||||
, withRedis ? false, hiredis
|
, withRedis ? false, hiredis
|
||||||
, withRest ? false, curl
|
, withRest ? false, curl
|
||||||
|
@ -41,6 +42,7 @@ stdenv.mkDerivation rec {
|
||||||
++ lib.optional withLdap openldap
|
++ lib.optional withLdap openldap
|
||||||
++ lib.optional withMemcached libmemcached
|
++ lib.optional withMemcached libmemcached
|
||||||
++ lib.optional withMysql libmysqlclient
|
++ lib.optional withMysql libmysqlclient
|
||||||
|
++ lib.optional withPostgresql postgresql
|
||||||
++ lib.optional withPcap libpcap
|
++ lib.optional withPcap libpcap
|
||||||
++ lib.optional withRedis hiredis
|
++ lib.optional withRedis hiredis
|
||||||
++ lib.optional withRest curl
|
++ lib.optional withRest curl
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue