Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 157d56d311aa
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5b8b5a694c7e
Choose a head ref
  • 9 commits
  • 6 files changed
  • 7 contributors

Commits on Jul 2, 2019

  1. nixos/deluge: user, group and web firewall opts.

    This commit adds new options to the Deluge service:
    
    - Allow configuration of the user/group which runs the deluged daemon.
    - Allow configuration of the user/group which runs the deluge web
      daemon.
    - Allow opening firewall for the deluge web daemon.
    davidtwco committed Jul 2, 2019

    Verified

    This commit was signed with the committer’s verified signature.
    davidtwco David Wood
    Copy the full SHA
    9837fac View commit details
  2. nixos/deluge: Add extractor dependencies.

    This commit adds the "Extractor" plugin dependencies to the PATH of the
    `deluged` service.
    davidtwco committed Jul 2, 2019

    Verified

    This commit was signed with the committer’s verified signature.
    davidtwco David Wood
    Copy the full SHA
    16c394f View commit details

Commits on Jul 10, 2019

  1. mautrix-whatsapp: 2019-02-24 -> 2019-07-04

    Bump to the latest revision of `mautrix-whatsapp` to regain
    compatibility with matrix-synapse 0.99.5.
    
    Please note that it was necessary to alter some of the sources in
    `deps.nix`, please read the comment at the top of the file for further
    information.
    Ma27 committed Jul 10, 2019

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    Ma27 Maximilian Bosch
    Copy the full SHA
    b86a3e4 View commit details

Commits on Jul 12, 2019

  1. Copy the full SHA
    7a40b2f View commit details
  2. Merge pull request #62911 from Ma27/bump-mautrix-whatsapp

    mautrix-whatsapp: 2019-02-24 -> 2019-07-04
    Ma27 authored Jul 12, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b279443 View commit details
  3. Verified

    This commit was signed with the committer’s verified signature.
    rvolosatovs Roman Volosatovs
    Copy the full SHA
    8bf1d5c View commit details
  4. Merge pull request #64652 from xrelkd/update/gitAndTools.hub

    gitAndTools.hub: 2.12.1 -> 2.12.2
    worldofpeace authored Jul 12, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    215497e View commit details
  5. zathura-pdf-poppler: fix source url (#64338)

    zathura-pdf-poppler: fix source url
    dywedir authored Jul 12, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ec381b5 View commit details
  6. Merge pull request #64112 from davidtwco/deluge/users-groups-firewalls

    nixos/deluge: add user/group/openFirewall opts and extraction packages to path
    infinisil authored Jul 12, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5b8b5a6 View commit details
91 changes: 70 additions & 21 deletions nixos/modules/services/torrent/deluge.nix
Original file line number Diff line number Diff line change
@@ -118,36 +118,74 @@ in {
more informations.
'';
};

user = mkOption {
type = types.str;
default = "deluge";
description = ''
User account under which deluge runs.
'';
};

group = mkOption {
type = types.str;
default = "deluge";
description = ''
Group under which deluge runs.
'';
};

extraPackages = mkOption {
type = types.listOf types.package;
default = [];
description = ''
Extra packages available at runtime to enable Deluge's plugins. For example,
extraction utilities are required for the built-in "Extractor" plugin.
This always contains unzip, gnutar, xz, p7zip and bzip2.
'';
};
};

deluge.web = {
enable = mkEnableOption "Deluge Web daemon";

port = mkOption {
type = types.port;
type = types.port;
default = 8112;
description = ''
Deluge web UI port.
'';
};

openFirewall = mkOption {
type = types.bool;
default = false;
description = ''
Open ports in the firewall for deluge web daemon
'';
};
};
};
};

config = mkIf cfg.enable {

systemd.tmpfiles.rules = [ "d '${configDir}' 0770 deluge deluge" ]
# Provide a default set of `extraPackages`.
services.deluge.extraPackages = with pkgs; [ unzip gnutar xz p7zip bzip2 ];

systemd.tmpfiles.rules = [ "d '${configDir}' 0770 ${cfg.user} ${cfg.group}" ]
++ optional (cfg.config ? "download_location")
"d '${cfg.config.download_location}' 0770 deluge deluge"
"d '${cfg.config.download_location}' 0770 ${cfg.user} ${cfg.group}"
++ optional (cfg.config ? "torrentfiles_location")
"d '${cfg.config.torrentfiles_location}' 0770 deluge deluge"
"d '${cfg.config.torrentfiles_location}' 0770 ${cfg.user} ${cfg.group}"
++ optional (cfg.config ? "move_completed_path")
"d '${cfg.config.move_completed_path}' 0770 deluge deluge";
"d '${cfg.config.move_completed_path}' 0770 ${cfg.user} ${cfg.group}";

systemd.services.deluged = {
after = [ "network.target" ];
description = "Deluge BitTorrent Daemon";
wantedBy = [ "multi-user.target" ];
path = [ pkgs.deluge ];
path = [ pkgs.deluge ] ++ cfg.extraPackages;
serviceConfig = {
ExecStart = ''
${pkgs.deluge}/bin/deluged \
@@ -157,8 +195,8 @@ in {
# To prevent "Quit & shutdown daemon" from working; we want systemd to
# manage it!
Restart = "on-success";
User = "deluge";
Group = "deluge";
User = cfg.user;
Group = cfg.group;
UMask = "0002";
LimitNOFILE = cfg.openFilesLimit;
};
@@ -177,26 +215,37 @@ in {
--config ${configDir} \
--port ${toString cfg.web.port}
'';
User = "deluge";
Group = "deluge";
User = cfg.user;
Group = cfg.group;
};
};

networking.firewall = mkIf (cfg.declarative && cfg.openFirewall && !(cfg.config.random_port or true)) {
allowedTCPPortRanges = singleton (listToRange (cfg.config.listen_ports or listenPortsDefault));
allowedUDPPortRanges = singleton (listToRange (cfg.config.listen_ports or listenPortsDefault));
};
networking.firewall = mkMerge [
(mkIf (cfg.declarative && cfg.openFirewall && !(cfg.config.random_port or true)) {
allowedTCPPortRanges = singleton (listToRange (cfg.config.listen_ports or listenPortsDefault));
allowedUDPPortRanges = singleton (listToRange (cfg.config.listen_ports or listenPortsDefault));
})
(mkIf (cfg.web.openFirewall) {
allowedTCPPorts = [ cfg.web.port ];
})
];

environment.systemPackages = [ pkgs.deluge ];

users.users.deluge = {
group = "deluge";
uid = config.ids.uids.deluge;
home = cfg.dataDir;
createHome = true;
description = "Deluge Daemon user";
users.users = mkIf (cfg.user == "deluge") {
deluge = {
group = cfg.group;
uid = config.ids.uids.deluge;
home = cfg.dataDir;
createHome = true;
description = "Deluge Daemon user";
};
};

users.groups.deluge.gid = config.ids.gids.deluge;
users.groups = mkIf (cfg.group == "deluge") {
deluge = {
gid = config.ids.gids.deluge;
};
};
};
}
6 changes: 4 additions & 2 deletions nixos/tests/deluge.nix
Original file line number Diff line number Diff line change
@@ -8,9 +8,11 @@ import ./make-test.nix ({ pkgs, ...} : {
simple = {
services.deluge = {
enable = true;
web.enable = true;
web = {
enable = true;
openFirewall = true;
};
};
networking.firewall.allowedTCPPorts = [ 8112 ];
};

declarative =
4 changes: 2 additions & 2 deletions pkgs/applications/misc/zathura/pdf-poppler/default.nix
Original file line number Diff line number Diff line change
@@ -5,8 +5,8 @@ stdenv.mkDerivation rec {
name = "zathura-pdf-poppler-${version}";

src = fetchurl {
url = "https://pwmt.org/projects/zathura/plugins/download/${name}.tar.xz";
sha256 = "1p4jcny0jniygns78mcf0nlm298dszh49qpmjmackrm6dq8hc25y";
url = "https://git.pwmt.org/pwmt/zathura-pdf-poppler/-/archive/${version}/${name}.tar.gz";
sha256 = "0c15rnwh42m3ybrhax01bl36w0iynaq8xg6l08riml3cyljypi9l";
};

nativeBuildInputs = [ meson ninja pkgconfig zathura_core ];
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

buildGoPackage rec {
pname = "hub";
version = "2.12.1";
version = "2.12.2";

goPackagePath = "github.com/github/hub";

@@ -13,7 +13,7 @@ buildGoPackage rec {
owner = "github";
repo = pname;
rev = "v${version}";
sha256 = "0i9bqcgdidl5zawkpq2fjrimzbb37i1m2fisvj32d27fsp1824bk";
sha256 = "0sxfmjg26s86m5xa9nbj8287kg12kygxw6gggahal6v7zjhwcvaz";
};

nativeBuildInputs = [ groff utillinux ];
6 changes: 3 additions & 3 deletions pkgs/servers/mautrix-whatsapp/default.nix
Original file line number Diff line number Diff line change
@@ -2,15 +2,15 @@

buildGoPackage rec {
name = "mautrix-unstable-${version}";
version = "2019-02-24";
version = "2019-07-04";

goPackagePath = "maunium.net/go/mautrix-whatsapp";

src = fetchFromGitHub {
owner = "tulir";
repo = "mautrix-whatsapp";
rev = "485acf6de654b8fb70007876c074fb004eb9717b";
sha256 = "1v7h3s8h0aiq6g06h9j1sidw8y5aiw24sgdh9knr1c90pvvc7pmv";
rev = "29f5ae45c4b22f463003b23e355b951831f08b3e";
sha256 = "12209m3x01i7bnnkg57ag1ivsk6n6pqaqfin7y02irgi3i3rm31r";
};

goDeps = ./deps.nix;
82 changes: 46 additions & 36 deletions pkgs/servers/mautrix-whatsapp/deps.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.