mirror of
https://git.sr.ht/~magic_rb/cluster
synced 2024-11-22 08:04:20 +01:00
f658de38a1
Signed-off-by: main <magic_rb@redalder.org>
49 lines
1.4 KiB
Nix
49 lines
1.4 KiB
Nix
{ nglib, camptules, nixpkgs }:
|
|
nglib.makeSystem {
|
|
system = "x86_64-linux";
|
|
name = "nixng-camptules";
|
|
inherit nixpkgs;
|
|
config = ({ pkgs, config, nglib, lib, ... }:
|
|
{
|
|
imports = [
|
|
camptules.nixngModule
|
|
];
|
|
|
|
config = {
|
|
dumb-init = {
|
|
enable = true;
|
|
type.services = {};
|
|
};
|
|
|
|
services.camptules = {
|
|
enable = true;
|
|
package =
|
|
let
|
|
yt-dlp = pkgs.yt-dlp.overrideAttrs (old:
|
|
rec {
|
|
version = "2021.12.1";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "yt-dlp";
|
|
repo = "yt-dlp";
|
|
rev = "46383212b336012f14b79839a5b344d35a6c90e4";
|
|
sha256 = "sha256-SlJXGsEmJRRMxUx0l3cwcGjJX6YhNNtg7inqHn/ckeE=";
|
|
};
|
|
}
|
|
);
|
|
youtube-dl = pkgs.writeShellScriptBin "youtube-dl"
|
|
''
|
|
${yt-dlp}/bin/yt-dlp "$@"
|
|
'';
|
|
in
|
|
pkgs.writeShellScriptBin "camptules"
|
|
''
|
|
export PATH=$PATH:${youtube-dl}/bin:${pkgs.ffmpeg}/bin
|
|
cd /secrets
|
|
${lib.trace camptules.defaultPackage."x86_64-linux".outPath camptules.defaultPackage."x86_64-linux"}/bin/camptules
|
|
'';
|
|
};
|
|
};
|
|
});
|
|
}
|