1 { lib, pkgs, config, myconfig, ... }:
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 ];
18 services.backup.profiles.pub = {
19 rootDir = "/var/lib/pub";
22 restrict = pkgs.runCommand "restrict" {
24 buildInputs = [ pkgs.makeWrapper ];
27 cp $file $out/bin/restrict
28 chmod a+x $out/bin/restrict
29 patchShebangs $out/bin/restrict
30 wrapProgram $out/bin/restrict \
31 --prefix PATH : ${lib.makeBinPath [ pkgs.bubblewrap pkgs.rrsync ]} \
32 --set TMUX_RESTRICT ${./tmux.restrict.conf}
34 purple-hangouts = pkgs.purple-hangouts.overrideAttrs(old: {
36 install -Dm755 -t $out/lib/purple-2/ libhangouts.so
37 for size in 16 22 24 48; do
38 install -TDm644 hangouts$size.png $out/share/pixmaps/pidgin/protocols/$size/hangouts.png
44 description = "Restricted shell user";
45 home = "/var/lib/pub";
46 uid = myconfig.env.users.pub.uid;
47 useDefaultShell = true;
51 (pkgs.pidgin.override { plugins = [
52 pkgs.purple-plugin-pack purple-hangouts
53 pkgs.purple-discord pkgs.purple-facebook