Advertisement
Guest User

mosh with patched libutempter for nixos

a guest
Jun 1st, 2018
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. {config, pkgs, lib, ...}:
  2. let
  3. libutempter = pkgs.libutempter.overrideAttrs ( oldAttrs: {
  4. prePatch = oldAttrs.prePatch + ''
  5. substituteInPlace iface.c --replace 'LIBEXECDIR "/utempter/utempter"' '"/run/wrappers/bin/utempter"'
  6. '';
  7.  
  8. } );
  9. mosh = pkgs.mosh.overrideAttrs ( oldAttrs: {
  10. buildInputs = oldAttrs.buildInputs ++ [ libutempter ];
  11. configureFlags = oldAttrs.configureFlags ++ [ "--with-utempter" ];
  12. } );
  13. in
  14. {
  15. networking.firewall.allowedUDPPortRanges = [ { from = 60000; to = 61000; } ];
  16.  
  17. environment.systemPackages = [
  18. mosh
  19. ];
  20.  
  21. security.wrappers = {
  22. utempter = {
  23. source = "${libutempter}/lib/utempter/utempter";
  24. program = "utempter";
  25. };
  26. };
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement