X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fpub%2Fdefault.nix;h=c4195306c6a53453f72edd1357b103507e66046a;hb=5315b439af1f72c3282549508ae58d86d66e38ec;hp=c31c8eb0e40e8367838e270b1d6848562820c6c8;hpb=8d213e2b1c934f6861f76aad5eb7c11097fa97de;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/pub/default.nix b/modules/private/pub/default.nix index c31c8eb..c419530 100644 --- a/modules/private/pub/default.nix +++ b/modules/private/pub/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, config, myconfig, ... }: +{ lib, pkgs, config, ... }: { options = { myServices.pub.enable = lib.mkOption { @@ -11,8 +11,12 @@ }; config = lib.mkIf config.myServices.pub.enable { + myServices.ssh.modules = [{ + snippet = builtins.readFile ./ldap_pub.sh; + dependencies = [ pkgs.coreutils ]; + }]; users.users.pub = let - restrict = pkgs.runCommand "restrict" { + restrict = pkgs.runCommand "restrict" { file = ./restrict; buildInputs = [ pkgs.makeWrapper ]; } '' @@ -36,7 +40,7 @@ createHome = true; description = "Restricted shell user"; home = "/var/lib/pub"; - uid = myconfig.env.users.pub.uid; + uid = config.myEnv.users.pub.uid; useDefaultShell = true; packages = [ restrict