mirror of
https://git.sr.ht/~azikx/karbur
synced 2024-10-30 07:26:20 +00:00
update
This commit is contained in:
parent
838850f2bf
commit
ce54edbf09
|
@ -1,5 +1,7 @@
|
|||
{
|
||||
imports = [
|
||||
./torrserver
|
||||
|
||||
./locale.nix
|
||||
./nh.nix
|
||||
./nix.nix
|
||||
|
|
|
@ -8,7 +8,7 @@ in {
|
|||
helix
|
||||
hyprland
|
||||
home-manager
|
||||
# (callPackage ./torrserver/default.nix { })
|
||||
# (callPackage ./torrserver/package.nix { })
|
||||
];
|
||||
|
||||
# PROGRAMS ENABLE
|
||||
|
|
17
host/misc/torrserver/default.nix
Normal file
17
host/misc/torrserver/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ pkgs, ... }:
|
||||
let torr = pkgs.callPackage ./package.nix { };
|
||||
in {
|
||||
systemd.services = {
|
||||
torrserver = { # TORRSERVER
|
||||
enable = true;
|
||||
after = [ "multi-user.target" "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${torr}/bin/torrserver";
|
||||
Restart = "on-failure";
|
||||
Type = "simple";
|
||||
TimeoutSec = 30;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
27
host/misc/torrserver/package.nix
Normal file
27
host/misc/torrserver/package.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ lib, stdenv, fetchurl, autoPatchelfHook }:
|
||||
let
|
||||
version = "134";
|
||||
hash = "sha256-WDygG9aGnD20nGxtG0t+T2KEwbJ+fZ0uRaCndirrsXI=";
|
||||
in stdenv.mkDerivation {
|
||||
name = "torrserver";
|
||||
dontUnpack = true;
|
||||
|
||||
src = fetchurl {
|
||||
url =
|
||||
"https://github.com/YouROK/TorrServer/releases/download/MatriX.${version}/TorrServer-linux-amd64";
|
||||
sha256 = "${hash}";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoPatchelfHook ];
|
||||
|
||||
installPhase =
|
||||
" mkdir -p $out/bin\n cp $src $out/bin/torrserver\n chmod +x $out/bin/torrserver\n";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Torrserver";
|
||||
homepage = "https://github.com/YouROK/TorrServer";
|
||||
license = licenses.unlicense;
|
||||
meta.platforms = platforms.all;
|
||||
mainProgram = "torrserver";
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue