lol

GateOne: init at 1.2

+80
+2
nixos/modules/misc/ids.nix
··· 228 228 subsonic = 204; 229 229 riak = 205; 230 230 shout = 206; 231 + gateone = 207; 231 232 232 233 # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399! 233 234 ··· 434 435 subsonic = 204; 435 436 riak = 205; 436 437 #shout = 206; #unused 438 + gateone = 207; 437 439 438 440 # When adding a gid, make sure it doesn't match an existing 439 441 # uid. Users and groups with the same name should have equal
+1
nixos/modules/module-list.nix
··· 283 283 ./services/networking/firewall.nix 284 284 ./services/networking/flashpolicyd.nix 285 285 ./services/networking/freenet.nix 286 + ./services/networking/gateone.nix 286 287 ./services/networking/git-daemon.nix 287 288 ./services/networking/gnunet.nix 288 289 ./services/networking/gogoclient.nix
+59
nixos/modules/services/networking/gateone.nix
··· 1 + { config, lib, pkgs, ...}: 2 + with lib; 3 + let 4 + cfg = config.services.gateone; 5 + in 6 + { 7 + options = { 8 + services.gateone = { 9 + enable = mkEnableOption "GateOne server"; 10 + pidDir = mkOption { 11 + default = "/run/gateone"; 12 + type = types.path; 13 + description = ''Path of pid files for GateOne.''; 14 + }; 15 + settingsDir = mkOption { 16 + default = "/var/lib/gateone"; 17 + type = types.path; 18 + description = ''Path of configuration files for GateOne.''; 19 + }; 20 + }; 21 + }; 22 + config = mkIf cfg.enable { 23 + environment.systemPackages = with pkgs.pythonPackages; [ 24 + gateone pkgs.openssh pkgs.procps pkgs.coreutils ]; 25 + 26 + users.extraUsers.gateone = { 27 + description = "GateOne privilege separation user"; 28 + uid = config.ids.uids.gateone; 29 + home = cfg.settingsDir; 30 + }; 31 + users.extraGroups.gateone.gid = config.ids.gids.gateone; 32 + 33 + systemd.services.gateone = with pkgs; { 34 + description = "GateOne web-based terminal"; 35 + path = [ pythonPackages.gateone nix openssh procps coreutils ]; 36 + preStart = '' 37 + if [ ! -d ${cfg.settingsDir} ] ; then 38 + mkdir -m 0750 -p ${cfg.settingsDir} 39 + mkdir -m 0750 -p ${cfg.pidDir} 40 + chown -R gateone.gateone ${cfg.settingsDir} 41 + chown -R gateone.gateone ${cfg.pidDir} 42 + fi 43 + ''; 44 + #unitConfig.RequiresMountsFor = "${cfg.settingsDir}"; 45 + serviceConfig = { 46 + ExecStart = ''${pythonPackages.gateone}/bin/gateone --settings_dir=${cfg.settingsDir} --pid_file=${cfg.pidDir}/gateone.pid --gid=${toString config.ids.gids.gateone} --uid=${toString config.ids.uids.gateone}''; 47 + User = "gateone"; 48 + Group = "gateone"; 49 + WorkingDirectory = cfg.settingsDir; 50 + PermissionsStartOnly = true; 51 + 52 + }; 53 + 54 + wantedBy = [ "multi-user.target" ]; 55 + requires = [ "network.target" ]; 56 + }; 57 + }; 58 + } 59 +
+18
pkgs/top-level/python-packages.nix
··· 3432 3432 }; 3433 3433 }; 3434 3434 3435 + gateone = buildPythonPackage rec { 3436 + name = "gateone-1.2-0d57c3"; 3437 + disabled = ! isPy27; 3438 + src = pkgs.fetchFromGitHub { 3439 + rev = "11ed97c663b3e8c1b8eba473b5cf8362b10d57c3"; 3440 + owner= "liftoff"; 3441 + repo = "GateOne"; 3442 + sha256 ="0zp9vfs6sqbx4d0g45kkjinfmsl9zqwa6bhp3xd81wx3ph9yr1hq"; 3443 + }; 3444 + propagatedBuildInputs = with pkgs.pythonPackages; [tornado futures html5lib readline pkgs.openssl]; 3445 + meta = { 3446 + homepage = https://liftoffsoftware.com/; 3447 + description = "GateOne is a web-based terminal emulator and SSH client"; 3448 + maintainers = with maintainers; [ tomberek ]; 3449 + 3450 + }; 3451 + }; 3452 + 3435 3453 gcutil = buildPythonPackage rec { 3436 3454 name = "gcutil-1.16.1"; 3437 3455 meta.maintainers = with maintainers; [ phreedom ];