1 { lib, pkgs, config, myconfig, mylibs, ... }:
4 services.pub.enable = lib.mkOption {
8 Whether to enable pub user.
13 config = lib.mkIf config.services.pub.enable {
15 restrict = pkgs.runCommand "restrict" {
17 buildInputs = [ pkgs.makeWrapper ];
20 cp $file $out/bin/restrict
21 chmod a+x $out/bin/restrict
22 patchShebangs $out/bin/restrict
23 wrapProgram $out/bin/restrict \
24 --prefix PATH : ${lib.makeBinPath [ pkgs.bubblewrap pkgs.rrsync ]} \
25 --set TMUX_RESTRICT ${./tmux.restrict.conf}
27 purple-hangouts = pkgs.purple-hangouts.overrideAttrs(old: {
29 install -Dm755 -t $out/lib/purple-2/ libhangouts.so
30 for size in 16 22 24 48; do
31 install -TDm644 hangouts$size.png $out/share/pixmaps/pidgin/protocols/$size/hangouts.png
37 description = "Restricted shell user";
38 home = "/var/lib/pub";
39 uid = myconfig.env.users.pub.uid;
40 useDefaultShell = true;
44 (pkgs.pidgin.override { plugins = [
45 pkgs.purple-plugin-pack purple-hangouts
46 pkgs.purple-discord pkgs.purple-facebook