all: format .nix filex with nixfmt-rfc
This commit is contained in:
@@ -4,11 +4,13 @@
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.qbittorrent;
|
||||
configDir = "${cfg.dataDir}/.config";
|
||||
openFilesLimit = 4096;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.services.qbittorrent = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
@@ -67,24 +69,24 @@ in {
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [pkgs.qbittorrent];
|
||||
environment.systemPackages = [ pkgs.qbittorrent ];
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
qbittorrent = prev.qbittorrent.override {guiSupport = false;};
|
||||
qbittorrent = prev.qbittorrent.override { guiSupport = false; };
|
||||
})
|
||||
];
|
||||
|
||||
networking.firewall = mkIf cfg.openFirewall {
|
||||
allowedTCPPorts = [cfg.port];
|
||||
allowedUDPPorts = [cfg.port];
|
||||
allowedTCPPorts = [ cfg.port ];
|
||||
allowedUDPPorts = [ cfg.port ];
|
||||
};
|
||||
|
||||
systemd.services.qbittorrent = {
|
||||
after = ["network.target"];
|
||||
after = [ "network.target" ];
|
||||
description = "qBittorrent Daemon";
|
||||
wantedBy = ["multi-user.target"];
|
||||
path = [pkgs.qbittorrent];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.qbittorrent ];
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
${pkgs.qbittorrent}/bin/qbittorrent-nox \
|
||||
@@ -110,7 +112,10 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
users.groups =
|
||||
mkIf (cfg.group == "qbittorrent") {qbittorrent = {gid = null;};};
|
||||
users.groups = mkIf (cfg.group == "qbittorrent") {
|
||||
qbittorrent = {
|
||||
gid = null;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user