2021-12-12 22:31:33 +01:00
|
|
|
{ nglib, camptules, nixpkgs }:
|
|
|
|
nglib.makeSystem {
|
2021-10-17 22:21:32 +02:00
|
|
|
system = "x86_64-linux";
|
|
|
|
name = "nixng-camptules";
|
2021-12-12 22:31:33 +01:00
|
|
|
inherit nixpkgs;
|
2021-10-17 22:21:32 +02:00
|
|
|
config = ({ pkgs, config, nglib, lib, ... }:
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
camptules.nixngModule
|
|
|
|
];
|
|
|
|
|
|
|
|
config = {
|
|
|
|
dumb-init = {
|
|
|
|
enable = true;
|
|
|
|
type.services = {};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.camptules = {
|
|
|
|
enable = true;
|
2021-12-12 22:31:33 +01:00
|
|
|
package =
|
|
|
|
let
|
2022-01-18 00:24:32 +01:00
|
|
|
youtube-dl = pkgs.writeShellScriptBin "youtube-dl"
|
2021-12-12 22:31:33 +01:00
|
|
|
''
|
2022-07-30 23:40:51 +02:00
|
|
|
${pkgs.yt-dlp}/bin/yt-dlp "$@"
|
2021-12-12 22:31:33 +01:00
|
|
|
'';
|
|
|
|
in
|
2022-01-18 00:24:32 +01:00
|
|
|
pkgs.writeShellScriptBin "camptules"
|
|
|
|
''
|
|
|
|
export PATH=$PATH:${youtube-dl}/bin:${pkgs.ffmpeg}/bin
|
2022-04-26 09:44:20 +02:00
|
|
|
cd /secrets
|
2022-01-18 00:24:32 +01:00
|
|
|
${lib.trace camptules.defaultPackage."x86_64-linux".outPath camptules.defaultPackage."x86_64-linux"}/bin/camptules
|
|
|
|
'';
|
2021-10-17 22:21:32 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|