{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/8573","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/8573/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/8573/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/8573/events","html_url":"https://github.com/NixOS/nixpkgs/pull/8573","id":92118697,"number":8573,"title":"shellinabox service: initial implementation","user":{"login":"lihop","id":3696783,"avatar_url":"https://avatars.githubusercontent.com/u/3696783?v=3","gravatar_id":"","url":"https://api.github.com/users/lihop","html_url":"https://github.com/lihop","followers_url":"https://api.github.com/users/lihop/followers","following_url":"https://api.github.com/users/lihop/following{/other_user}","gists_url":"https://api.github.com/users/lihop/gists{/gist_id}","starred_url":"https://api.github.com/users/lihop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lihop/subscriptions","organizations_url":"https://api.github.com/users/lihop/orgs","repos_url":"https://api.github.com/users/lihop/repos","events_url":"https://api.github.com/users/lihop/events{/privacy}","received_events_url":"https://api.github.com/users/lihop/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/nixos","name":"nixos","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-30T15:05:41Z","updated_at":"2015-07-04T00:59:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/8573","html_url":"https://github.com/NixOS/nixpkgs/pull/8573","diff_url":"https://github.com/NixOS/nixpkgs/pull/8573.diff","patch_url":"https://github.com/NixOS/nixpkgs/pull/8573.patch"},"body":"[Shellinabox](https://code.google.com/p/shellinabox/) is a web server that can export arbitrary command line tools to a web based terminal emulator. The emulator works in any JavaScript and CSS enabled browser. This module allows the shellinabox program to be run as a service.\r\n\r\nAn example configuration:\r\n```nix\r\n{\r\nservices.shellinabox = {\r\n  enable = true;\r\n  enableSSL = true;\r\n  certDirectory = \"/tmp\";\r\n  extraOptions = [\r\n    \"--port=443\"\r\n    \"--service /:LOGIN\"\r\n    \"--service /who:nobody:nogroup:/:${pkgs.coreutils}/bin/who\"\r\n  ];\r\n}\r\n```\r\nServes a login shell at `https://localhost` and shows a list of logged in users at `https://localhost/who`.\r\n\r\nThe minimal configuration:\r\n```nix\r\n{ services.shellinabox.enable = true; }\r\n```\r\nresults in shellinabox's default behaviour of serving a login shell on port 4200.\r\n\r\nA couple of notes:\r\n* When invoked without any command line arguments, shellinaboxd attempts to create an SSL certificate in the current working directory and then falls back to non-SSL mode if it cannot. I didn't want to make any assumptions about what the default \"working directory\" should be, so I let shellinaboxd fallback to non-SSL mode unless SSL is explicitly enabled in which case a directory or certificate file must be provided.\r\n\r\n* Another odd feature of shellinboxd is that, when supplying it with a certificate, it expects a file descriptor as a command line argument. I couldn't think of a way of providing this file descriptor to shellinaboxd other than wrapping it in bash line which first sets the file descriptor before invoking shellinaboxd.\r\n\r\nI welcome your feedback."},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/118447196","html_url":"https://github.com/NixOS/nixpkgs/pull/8573#issuecomment-118447196","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/8573","id":118447196,"user":{"login":"lihop","id":3696783,"avatar_url":"https://avatars.githubusercontent.com/u/3696783?v=3","gravatar_id":"","url":"https://api.github.com/users/lihop","html_url":"https://github.com/lihop","followers_url":"https://api.github.com/users/lihop/followers","following_url":"https://api.github.com/users/lihop/following{/other_user}","gists_url":"https://api.github.com/users/lihop/gists{/gist_id}","starred_url":"https://api.github.com/users/lihop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lihop/subscriptions","organizations_url":"https://api.github.com/users/lihop/orgs","repos_url":"https://api.github.com/users/lihop/repos","events_url":"https://api.github.com/users/lihop/events{/privacy}","received_events_url":"https://api.github.com/users/lihop/received_events","type":"User","site_admin":false},"created_at":"2015-07-04T00:59:12Z","updated_at":"2015-07-04T00:59:12Z","body":"@jagajaga Can this be merged?\r\nI'll start writing a wiki page as soon as it's in."}}