Compare commits

...

2 Commits

Author SHA1 Message Date
nyanloutre b34231217a replace youtube-dl by yt-dlp 2024-07-14 16:14:58 +02:00
nyanloutre 260cf20971 LoutreOS: install watcharr 2024-07-14 16:14:45 +02:00
4 changed files with 23 additions and 6 deletions

View File

@ -61,6 +61,21 @@
}; };
}; };
}; };
systemd.services.watcharr = {
description = "Watcharr";
after = [ "network.target" ];
environment = {
PORT = "3005";
WATCHARR_DATA = "/var/lib/watcharr";
};
serviceConfig = {
DynamicUser = true;
StateDirectory = "watcharr";
ExecStart = "${self.packages.x86_64-linux.watcharr}/bin/Watcharr";
PrivateTmp = true;
};
wantedBy = [ "multi-user.target" ];
};
} }
./systems/LoutreOS/configuration.nix ./systems/LoutreOS/configuration.nix
]; ];

View File

@ -11,18 +11,18 @@
}: }:
let let
version = "1.39.0"; version = "1.41.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "sbondCo"; owner = "sbondCo";
repo = "Watcharr"; repo = "Watcharr";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-40XLYc1ub2Qzf8r9g+Ay8Y8CAHYU+P9CI60heLAuQkE="; hash = "sha256-ZvCxgfZZ9pbp+NvH+IhWphJWnAwgAH0x/REPd/XxJ70=";
}; };
frontend = buildNpmPackage { frontend = buildNpmPackage {
pname = "watcharr-ui"; pname = "watcharr-ui";
inherit version src; inherit version src;
npmDepsHash = "sha256-sigkeK1bLbZfOU8756yLt5avqnOJWC4t4TnV6EvFTPY="; npmDepsHash = "sha256-73paI0y4QyzkEnU99f1HeLD/hW8GP3F9N8tGGQnloH8=";
installPhase = '' installPhase = ''
cp -r build $out cp -r build $out
@ -37,14 +37,15 @@ buildGoModule {
src = src + "/server"; src = src + "/server";
vendorHash = "sha256-vmroCetQc1Ix65B2Br33lyWt0FwGeQXMoD5fLinQg28="; vendorHash = "sha256-86pFpS8ZSj+c7vwn0QCwzXlvVYJIf3SBj4X81zlwBWQ=";
# Inject frontend assets into go embed # Inject frontend assets into go embed
prePatch = '' prePatch = ''
# rm -rf ui # rm -rf ui
# ln -s ${frontend} ui # ln -s ${frontend} ui
substituteInPlace watcharr.go \ substituteInPlace watcharr.go \
--replace-fail ui/index.js ${frontend}/index.js --replace-fail ui/index.js ${frontend}/index.js \
--replace-fail \"127.0.0.1:3000\" "\"127.0.0.1:\"+os.Getenv(\"PORT\")"
''; '';
buildInputs = [ pkgs.makeWrapper ]; buildInputs = [ pkgs.makeWrapper ];

View File

@ -352,6 +352,7 @@ in
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
}; };
"watcharr.nyanlout.re" = simpleReverse 3080;
}; };
}; };

View File

@ -57,7 +57,7 @@
fzf fzf
file file
ncdu ncdu
youtube-dl yt-dlp
tldr tldr
starship starship