modules/idm: init
This commit is contained in:
parent
ee60009305
commit
3b5888418f
2 changed files with 27 additions and 0 deletions
|
@ -9,6 +9,7 @@ let
|
||||||
./games
|
./games
|
||||||
./hardened
|
./hardened
|
||||||
./hyprspace
|
./hyprspace
|
||||||
|
./idm
|
||||||
./ipfs
|
./ipfs
|
||||||
./jackett
|
./jackett
|
||||||
./laptop-config
|
./laptop-config
|
||||||
|
@ -32,6 +33,7 @@ in rec {
|
||||||
base = [
|
base = [
|
||||||
autopatch
|
autopatch
|
||||||
hardened
|
hardened
|
||||||
|
idm
|
||||||
];
|
];
|
||||||
|
|
||||||
networking = [ firewall ssh ];
|
networking = [ firewall ssh ];
|
||||||
|
|
25
modules/idm/default.nix
Normal file
25
modules/idm/default.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.kanidm = {
|
||||||
|
enableClient = true;
|
||||||
|
clientSettings = {
|
||||||
|
uri = "https://idm.privatevoid.net";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = let
|
||||||
|
idmAlias = pkgs.runCommand "kanidm-idm-alias" {} ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
ln -s ${pkgs.kanidm}/bin/kanidm $out/bin/idm
|
||||||
|
mkdir -p $out/share/bash-completion/completions
|
||||||
|
cat >$out/share/bash-completion/completions/idm.bash <<EOF
|
||||||
|
source ${pkgs.kanidm}/share/bash-completion/completions/kanidm.bash
|
||||||
|
complete -F _kanidm -o bashdefault -o default idm
|
||||||
|
EOF
|
||||||
|
mkdir -p $out/share/zsh/site-functions
|
||||||
|
cp ${pkgs.kanidm}/share/zsh/site-functions/_kanidm $out/share/zsh/site-functions/_idm
|
||||||
|
substituteInPlace $out/share/zsh/site-functions/_idm --replace kanidm idm
|
||||||
|
'';
|
||||||
|
in [ idmAlias ];
|
||||||
|
}
|
Loading…
Reference in a new issue