1
0
Fork 0
mirror of https://git.sr.ht/~azikx/karbur synced 2024-10-30 07:16:18 +00:00

update 

This commit is contained in:
azikx 2024-10-24 19:09:50 +09:00
parent 838850f2bf
commit ce54edbf09
4 changed files with 47 additions and 1 deletions

View file

@ -1,5 +1,7 @@
{ {
imports = [ imports = [
./torrserver
./locale.nix ./locale.nix
./nh.nix ./nh.nix
./nix.nix ./nix.nix

View file

@ -8,7 +8,7 @@ in {
helix helix
hyprland hyprland
home-manager home-manager
# (callPackage ./torrserver/default.nix { }) # (callPackage ./torrserver/package.nix { })
]; ];
# PROGRAMS ENABLE # PROGRAMS ENABLE

View 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;
};
};
};
}

View 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";
};
}