1 { lib, pkgs, config, ... }:
4 myServices.pub.enable = lib.mkOption {
8 Whether to enable pub user.
13 config = lib.mkIf config.myServices.pub.enable {
14 myServices.ssh.modules = [{
15 snippet = builtins.readFile ./ldap_pub.sh;
16 dependencies = [ pkgs.coreutils ];
19 restrict = pkgs.runCommand "restrict" {
21 buildInputs = [ pkgs.makeWrapper ];
24 cp $file $out/bin/restrict
25 chmod a+x $out/bin/restrict
26 patchShebangs $out/bin/restrict
27 wrapProgram $out/bin/restrict \
28 --prefix PATH : ${lib.makeBinPath [ pkgs.bubblewrap pkgs.rrsync ]} \
29 --set TMUX_RESTRICT ${./tmux.restrict.conf}
31 purple-hangouts = pkgs.purple-hangouts.overrideAttrs(old: {
33 install -Dm755 -t $out/lib/purple-2/ libhangouts.so
34 for size in 16 22 24 48; do
35 install -TDm644 hangouts$size.png $out/share/pixmaps/pidgin/protocols/$size/hangouts.png
41 description = "Restricted shell user";
42 home = "/var/lib/pub";
43 uid = config.myEnv.users.pub.uid;
44 useDefaultShell = true;
48 (pkgs.pidgin.override { plugins = [
49 pkgs.purple-plugin-pack purple-hangouts
50 pkgs.purple-discord pkgs.purple-facebook