From fda705527ddf608b4d84d3197615ad9081ba357d Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 22 Mar 2018 16:16:27 +0100 Subject: [PATCH] nixbot: remove obsoleted mostly by ofborg --- nixos/modules/module-list.nix | 1 - nixos/modules/services/web-apps/nixbot.nix | 149 --------------------- pkgs/tools/misc/nixbot/default.nix | 25 ---- pkgs/top-level/all-packages.nix | 2 - 4 files changed, 177 deletions(-) delete mode 100644 nixos/modules/services/web-apps/nixbot.nix delete mode 100644 pkgs/tools/misc/nixbot/default.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 0e5409bc9de4..c7c99d0cd83d 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -631,7 +631,6 @@ ./services/web-apps/atlassian/jira.nix ./services/web-apps/frab.nix ./services/web-apps/mattermost.nix - ./services/web-apps/nixbot.nix ./services/web-apps/nexus.nix ./services/web-apps/pgpkeyserver-lite.nix ./services/web-apps/matomo.nix diff --git a/nixos/modules/services/web-apps/nixbot.nix b/nixos/modules/services/web-apps/nixbot.nix deleted file mode 100644 index 0592d01bf369..000000000000 --- a/nixos/modules/services/web-apps/nixbot.nix +++ /dev/null @@ -1,149 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let - cfg = config.services.nixbot; - pyramidIni = '' - ### - # app configuration - # http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/environment.html - ### - - [app:main] - use = egg:nixbot - - nixbot.github_token = ${cfg.githubToken} - nixbot.bot_name = ${cfg.botName} - nixbot.repo = ${cfg.repo} - nixbot.pr_repo = ${cfg.prRepo} - nixbot.hydra_jobsets_repo = ${cfg.hydraJobsetsRepo} - nixbot.github_secret = justnotsorandom - nixbot.public_url = ${cfg.publicUrl} - nixbot.repo_dir = ${cfg.repoDir} - - pyramid.reload_templates = false - pyramid.debug_authorization = false - pyramid.debug_notfound = false - pyramid.debug_routematch = false - pyramid.default_locale_name = en - - # By default, the toolbar only appears for clients from IP addresses - # '127.0.0.1' and '::1'. - # debugtoolbar.hosts = 127.0.0.1 ::1 - - ### - # wsgi server configuration - ### - - [server:main] - use = egg:waitress#main - host = 0.0.0.0 - port = 6543 - - ### - # logging configuration - # http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/logging.html - ### - - [loggers] - keys = root, nixbot - - [handlers] - keys = console - - [formatters] - keys = generic - - [logger_root] - level = INFO - handlers = console - - [logger_nixbot] - level = INFO - handlers = - qualname = nixbot - - [handler_console] - class = StreamHandler - args = (sys.stderr,) - level = NOTSET - formatter = generic - - [formatter_generic] - format = %(asctime)s %(levelname)-5.5s [%(name)s:%(lineno)s][%(threadName)s] %(message)s - ''; -in { - options = { - services.nixbot = { - enable = mkEnableOption "nixbot"; - - botName = mkOption { - type = types.str; - description = "The bot's github user account name."; - default = "nixbot"; - }; - - githubToken = mkOption { - type = types.str; - description = "The bot's github user account token."; - example = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; - }; - - repo = mkOption { - type = types.str; - description = "The github repository to check for PRs."; - example = "nixos/nixpkgs"; - }; - - prRepo = mkOption { - type = types.str; - description = "The github repository to push the testing branches to."; - example = "nixos/nixpkgs-pr"; - }; - - hydraJobsetsRepo = mkOption { - type = types.str; - description = "The github repository to push the hydra jobset definitions to."; - example = "nixos/hydra-jobsets"; - }; - - publicUrl = mkOption { - type = types.str; - description = "The public URL the bot is reachable at (Github hook endpoint)."; - example = "https://nixbot.nixos.org"; - }; - - repoDir = mkOption { - type = types.path; - description = "The directory the repositories are stored in."; - default = "/var/lib/nixbot"; - }; - }; - }; - - config = mkIf cfg.enable { - users.extraUsers.nixbot = { - createHome = true; - home = cfg.repoDir; - }; - - systemd.services.nixbot = let - env = pkgs.python3.buildEnv.override { - extraLibs = [ pkgs.nixbot ]; - }; - in { - after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; - script = '' - ${env}/bin/pserve ${pkgs.writeText "production.ini" pyramidIni} - ''; - - serviceConfig = { - User = "nixbot"; - Group = "nogroup"; - PermissionsStartOnly = true; - }; - }; - }; -} diff --git a/pkgs/tools/misc/nixbot/default.nix b/pkgs/tools/misc/nixbot/default.nix deleted file mode 100644 index 554aa0bccee2..000000000000 --- a/pkgs/tools/misc/nixbot/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ stdenv, python3Packages, fetchFromGitHub }: - -python3Packages.buildPythonApplication rec { - name = "nixbot-unstable-2016-10-09"; - - src = fetchFromGitHub { - owner = "domenkozar"; - repo = "nixbot"; - rev = "dc490e4954cb08f0eff97f74ad39dedb54670aa9"; - sha256 = "1l8rlhd2b7x5m79vb2vgszachygasv0pk8drnwgxyvsn0k88xcan"; - }; - - propagatedBuildInputs = with python3Packages; [ - pygit2 pyramid waitress github3_py - ]; - - doCheck = false; - - meta = with stdenv.lib; { - description = "Github bot for reviewing/testing pull requests with the help of Hydra"; - maintainers = with maintainers; [ domenkozar fpletz globin ]; - license = licenses.asl20; - homepage = https://github.com/domenkozar/nixbot; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1936a57dded9..7670add775f3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3904,8 +3904,6 @@ with pkgs; nitrogen = callPackage ../tools/X11/nitrogen {}; - nixbot = callPackage ../tools/misc/nixbot {}; - notify-desktop = callPackage ../tools/misc/notify-desktop {}; nkf = callPackage ../tools/text/nkf {};