applied nixfmt (new version)

This commit is contained in:
2024-09-22 14:45:24 -06:00
parent dd00fb4854
commit b514828594
89 changed files with 2091 additions and 1339 deletions

View File

@@ -1,7 +1,18 @@
{ lib, config, pkgs, proxyReverse, ... }:
{
lib,
config,
pkgs,
proxyReverse,
...
}:
let
port = 9091;
ports = [ port 51411 51412 51413 ];
ports = [
port
51411
51412
51413
];
bencodepy = pkgs.python3Packages.buildPythonPackage {
pname = "bencodepy";
version = "0.9.5";
@@ -15,7 +26,8 @@ let
};
build-system = with pkgs.python3Packages; [ setuptools ];
};
qbit_manage_env = pkgs.python3.withPackages (ps:
qbit_manage_env = pkgs.python3.withPackages (
ps:
[
ps.croniter
ps.gitpython
@@ -26,17 +38,19 @@ let
ps.retrying
ps.ruamel-yaml
ps.schedule
] ++ [ bencodepy ]);
in {
]
++ [ bencodepy ]
);
in
{
options.my.servers = {
qbittorrent.enable = lib.mkEnableOption "enable";
unpackerr.enable = lib.mkEnableOption "enable";
};
config = lib.mkIf config.my.servers.qbittorrent.enable {
home-manager.users.jawz.xdg.configFile."unpackerr.conf" =
lib.mkIf config.my.servers.unpackerr.enable {
source = ../../dotfiles/unpackerr.conf;
};
lib.mkIf config.my.servers.unpackerr.enable
{ source = ../../dotfiles/unpackerr.conf; };
systemd = {
packages = [ pkgs.qbittorrent-nox ];
services = {
@@ -52,13 +66,15 @@ in {
restartIfChanged = true;
description = "Tidy up my torrents";
wantedBy = [ "default.target" ];
serviceConfig = let env = "/home/jawz/Development/Git/qbit_manage";
in {
Restart = "on-failure";
RestartSec = 30;
ExecStart =
"${qbit_manage_env}/bin/python ${env}/qbit_manage.py -r -c ${env}/config.yml";
};
serviceConfig =
let
env = "/home/jawz/Development/Git/qbit_manage";
in
{
Restart = "on-failure";
RestartSec = 30;
ExecStart = "${qbit_manage_env}/bin/python ${env}/qbit_manage.py -r -c ${env}/config.yml";
};
};
unpackerr = lib.mkIf config.my.servers.unpackerr.enable {
enable = true;
@@ -68,8 +84,7 @@ in {
serviceConfig = {
Restart = "on-failure";
RestartSec = 30;
ExecStart =
"${pkgs.unpackerr}/bin/unpackerr -c /home/jawz/.config/unpackerr.conf";
ExecStart = "${pkgs.unpackerr}/bin/unpackerr -c /home/jawz/.config/unpackerr.conf";
};
};
};
@@ -77,12 +92,13 @@ in {
enable = true;
description = "Tidy up my torrents";
wantedBy = [ "timers.target" ];
timerConfig = { OnCalendar = "*:0/10"; };
timerConfig = {
OnCalendar = "*:0/10";
};
};
};
};
services.nginx.virtualHosts."xfwmrle6h6skqujbeizw.${config.my.domain}" =
proxyReverse port // { };
services.nginx.virtualHosts."xfwmrle6h6skqujbeizw.${config.my.domain}" = proxyReverse port // { };
networking.firewall = {
allowedTCPPorts = ports;
allowedUDPPorts = ports;