forked from DGNum/infrastructure
feat(radius): Init config
This commit is contained in:
parent
3e763f419a
commit
f173138848
14 changed files with 426 additions and 0 deletions
33
machines/compute01/k-radius/packages/rlm_python.nix
Normal file
33
machines/compute01/k-radius/packages/rlm_python.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ stdenv, fetchFromGitHub, python3, pykanidm }:
|
||||
|
||||
let pythonPath = with python3.pkgs; makePythonPath [ pykanidm ];
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "rlm_python";
|
||||
version = "1.1.0-rc.15";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kanidm";
|
||||
repo = "kanidm";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-0y8juXS61Z9zxOdsWAQ6lJurP+n855Nela6egYRecok=";
|
||||
};
|
||||
|
||||
patches = [ ./python_path.patch ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace rlm_python/mods-available/python3 \
|
||||
--replace "@kanidm_python@" "${pythonPath}"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/etc/raddb/
|
||||
cp -R rlm_python/{mods-available,sites-available} $out/etc/raddb/
|
||||
'';
|
||||
|
||||
phases = [ "unpackPhase" "patchPhase" "installPhase" ];
|
||||
|
||||
passthru = { inherit pythonPath; };
|
||||
|
||||
preferLocalBuild = true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue