Merge branch 'rm-notbit' of git://github.com/jgillich/nixpkgs

Shea Levy 4a511911 57cb5ab1

+2 -159
+2 -2
nixos/modules/misc/ids.nix
··· 136 kippo = 108; 137 jenkins = 109; 138 systemd-journal-gateway = 110; 139 - notbit = 111; 140 ngircd = 112; 141 btsync = 113; 142 minecraft = 114; ··· 356 kippo = 108; 357 jenkins = 109; 358 systemd-journal-gateway = 110; 359 - notbit = 111; 360 #ngircd = 112; # unused 361 btsync = 113; 362 #minecraft = 114; # unused
··· 136 kippo = 108; 137 jenkins = 109; 138 systemd-journal-gateway = 110; 139 + #notbit = 111; # unused 140 ngircd = 112; 141 btsync = 113; 142 minecraft = 114; ··· 356 kippo = 108; 357 jenkins = 109; 358 systemd-journal-gateway = 110; 359 + #notbit = 111; # unused 360 #ngircd = 112; # unused 361 btsync = 113; 362 #minecraft = 114; # unused
-1
nixos/modules/module-list.nix
··· 322 ./services/networking/networkmanager.nix 323 ./services/networking/ngircd.nix 324 ./services/networking/nix-serve.nix 325 - ./services/networking/notbit.nix 326 ./services/networking/nsd.nix 327 ./services/networking/ntopng.nix 328 ./services/networking/ntpd.nix
··· 322 ./services/networking/networkmanager.nix 323 ./services/networking/ngircd.nix 324 ./services/networking/nix-serve.nix 325 ./services/networking/nsd.nix 326 ./services/networking/ntopng.nix 327 ./services/networking/ntpd.nix
-130
nixos/modules/services/networking/notbit.nix
··· 1 - { config, lib, pkgs, ... }: 2 - 3 - with lib; 4 - let 5 - cfg = config.services.notbit; 6 - varDir = "/var/lib/notbit"; 7 - 8 - sendmail = pkgs.stdenv.mkDerivation { 9 - name = "notbit-wrapper"; 10 - buildInputs = [ pkgs.makeWrapper ]; 11 - propagatedBuildInputs = [ pkgs.notbit ]; 12 - buildCommand = '' 13 - mkdir -p $out/bin 14 - makeWrapper ${pkgs.notbit}/bin/notbit-sendmail $out/bin/notbit-system-sendmail \ 15 - --set XDG_RUNTIME_DIR ${varDir} 16 - ''; 17 - }; 18 - opts = "${optionalString cfg.allowPrivateAddresses "-L"} ${optionalString cfg.noBootstrap "-b"} ${optionalString cfg.specifiedPeersOnly "-e"}"; 19 - peers = concatStringsSep " " (map (str: "-P \"${str}\"") cfg.peers); 20 - listen = if cfg.listenAddress == [] then "-p ${toString cfg.port}" else 21 - concatStringsSep " " (map (addr: "-a \"${addr}:${toString cfg.port}\"") cfg.listenAddress); 22 - in 23 - 24 - with lib; 25 - { 26 - 27 - ### configuration 28 - 29 - options = { 30 - 31 - services.notbit = { 32 - 33 - enable = mkOption { 34 - type = types.bool; 35 - default = false; 36 - description = '' 37 - Enables the notbit daemon and provides a sendmail binary named `notbit-system-sendmail` for sending mail over the system instance of notbit. Users must be in the notbit group in order to send mail over the system notbit instance. Currently mail recipt is not supported. 38 - ''; 39 - }; 40 - 41 - port = mkOption { 42 - type = types.int; 43 - default = 8444; 44 - description = "The port which the daemon listens for other bitmessage clients"; 45 - }; 46 - 47 - nice = mkOption { 48 - type = types.int; 49 - default = 10; 50 - description = "Set the nice level for the notbit daemon"; 51 - }; 52 - 53 - listenAddress = mkOption { 54 - type = types.listOf types.str; 55 - default = [ ]; 56 - example = [ "localhost" "myhostname" ]; 57 - description = "The addresses which notbit will use to listen for incoming connections. These addresses are advertised to connecting clients."; 58 - }; 59 - 60 - peers = mkOption { 61 - type = types.listOf types.str; 62 - default = [ ]; 63 - example = [ "bitmessage.org:8877" ]; 64 - description = "The initial set of peers notbit will connect to."; 65 - }; 66 - 67 - specifiedPeersOnly = mkOption { 68 - type = types.bool; 69 - default = false; 70 - description = "If true, notbit will only connect to peers specified by the peers option."; 71 - }; 72 - 73 - allowPrivateAddresses = mkOption { 74 - type = types.bool; 75 - default = false; 76 - description = "If true, notbit will allow connections to to RFC 1918 addresses."; 77 - }; 78 - 79 - noBootstrap = mkOption { 80 - type = types.bool; 81 - default = false; 82 - description = "If true, notbit will not bootstrap an initial peerlist from bitmessage.org servers"; 83 - }; 84 - 85 - }; 86 - 87 - }; 88 - 89 - ### implementation 90 - 91 - config = mkIf cfg.enable { 92 - 93 - environment.systemPackages = [ sendmail ]; 94 - 95 - systemd.services.notbit = { 96 - description = "Notbit daemon"; 97 - after = [ "network.target" ]; 98 - wantedBy = [ "multi-user.target" ]; 99 - path = [ pkgs.notbit ]; 100 - environment = { XDG_RUNTIME_DIR = varDir; }; 101 - 102 - postStart = '' 103 - [ ! -f "${varDir}/addr" ] && notbit-keygen > ${varDir}/addr 104 - chmod 0640 ${varDir}/{addr,notbit/notbit-ipc.lock} 105 - chmod 0750 ${varDir}/notbit/{,notbit-ipc} 106 - ''; 107 - 108 - serviceConfig = { 109 - Type = "forking"; 110 - ExecStart = "${pkgs.notbit}/bin/notbit -d ${listen} ${peers} ${opts}"; 111 - User = "notbit"; 112 - Group = "notbit"; 113 - UMask = "0077"; 114 - WorkingDirectory = varDir; 115 - Nice = cfg.nice; 116 - }; 117 - }; 118 - 119 - users.extraUsers.notbit = { 120 - group = "notbit"; 121 - description = "Notbit daemon user"; 122 - home = varDir; 123 - createHome = true; 124 - uid = config.ids.uids.notbit; 125 - }; 126 - 127 - users.extraGroups.notbit.gid = config.ids.gids.notbit; 128 - }; 129 - 130 - }
···
-24
pkgs/applications/networking/notbit/default.nix
··· 1 - { stdenv, fetchgit, autoconf, automake, pkgconfig, openssl }: 2 - 3 - stdenv.mkDerivation rec { 4 - name = "notbit-git-6f1ca59"; 5 - 6 - src = fetchgit { 7 - url = "git://github.com/bpeel/notbit"; 8 - rev = "6f1ca5987c7f217c9c3dd27adf6ac995004c29a1"; 9 - sha256 = "0h9nzm248pw9wrdsfkr580ghiqvh6mk6vx7r2r752awrc13wvgis"; 10 - }; 11 - 12 - buildInputs = [ autoconf automake pkgconfig openssl ]; 13 - 14 - preConfigure = "autoreconf -vfi"; 15 - 16 - meta = with stdenv.lib; { 17 - homepage = http://busydoingnothing.co.uk/notbit/; 18 - description = "A minimal bitmessage client"; 19 - license = licenses.mit; 20 - 21 - # This is planned to change when the project officially supports other platforms 22 - platforms = platforms.linux; 23 - }; 24 - }
···
-2
pkgs/top-level/all-packages.nix
··· 2463 graphicalSupport = true; 2464 }; 2465 2466 - notbit = callPackage ../applications/networking/notbit { }; 2467 - 2468 notify-osd = callPackage ../applications/misc/notify-osd { }; 2469 2470 nox = callPackage ../tools/package-management/nox {
··· 2463 graphicalSupport = true; 2464 }; 2465 2466 notify-osd = callPackage ../applications/misc/notify-osd { }; 2467 2468 nox = callPackage ../tools/package-management/nox {