-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pinchflat: init at v2025.1.14 #364135
base: master
Are you sure you want to change the base?
pinchflat: init at v2025.1.14 #364135
Conversation
10e5a01
to
2b573e5
Compare
8613a7b
to
cdad1a1
Compare
I enabled the pinchflat service and it seems to work well, I'm archiving a channel now. However, I haven't reviewed the code, just testing if it works or not. I do wonder if there is a way to automate the secrets file part, as that takes some additional manual set up that isn't clear if you never used pinchflat before. Effectively I needed to install elixir, and generate the key by running an interactive Other observations are the systemd log for the service is very verbose, and perhaps this is due to pinchflat itself I don't know. I do notice you have LOG_LEVEL = "info" as an example one could use for extraConfig. Perhaps enable a less verbose log level by default? Again just my observations from an initial install/setup user perspective, not a review of the code or service implementation etc. In a nutshell, it seems to install and function as intended, nice work! One other suggestion is perhaps note that the This is a pretty cool tool though, nice job. Another idea is make it so channels to archive can be supplied in the configuration.nix, similar to how the ollama service allows ppl to declare what models they want downloaded by passing them to services.ollama.loadModels. |
Note I ran into an error when setting extraConfig: error: attribute 'toString' missing
at /home/nixos/nixpkgs/nixos/modules/services/misc/pinchflat.nix:131:70:
130| "PHX_SERVER=true"
131| ] ++ lib.attrValues (lib.mapAttrs (name: value: name + "=" + lib.toString value) cfg.extraConfig);
| ^
132| EnvironmentFile = lib.optional (cfg.secretsFile != null) cfg.secretsFile; I changed the value via services.pinchflat.extraConfig = {
LOG_LEVEL = "info";
} as suggested in However I was able to make this work by modifying ] ++ lib.attrValues (lib.mapAttrs (name: value: name + "=" + lib.toString value) cfg.extraConfig); to ] ++ lib.attrValues (lib.mapAttrs (name: value: name + "=" + builtins.toString value) cfg.extraConfig); |
Another observation, config = mkIf cfg.enable {
services.pinchflat.mediaDir = lib.mkDefault "${cfg.dataDir}/media"; and user can still change the value if they please. As it currently stands, if user changes |
Oops, yes, thank you for catching this! |
Absolutely, good call. Should have done that from the get-go. |
I will add a note in the docs for the option. You can use any string longer than 64 bytes, it doesn't appear to matter if they were generated like you / the docs describe. But I also just double-checked and it looks like adding a
Agreed, it's very verbose.
I am afraid this one is not possible. The reason this can be done for e.g. ollama is that setting a I checked the pinchflat repo, and it does not appear that such a feature request has been made in the past. But I honestly don't know if it even could be added at a reasonable amount of effort. Because it's not just the channels you need to define, you also need to define all the other download settings, as well as a media profile with all of its settings. These then need to be read in to the database, as well as have a mechanism to detect when old entries were removed, and so on. I think this is just one of those services - like sonarr, jellyfin,... - that are sufficiently complex to configure that a fully stateless solution isn't feasible :( But hey, thanks for your review! 🎉 I'll push the requested changes shortly. |
cdad1a1
to
de3739b
Compare
de3739b
to
f827028
Compare
f827028
to
f6277dd
Compare
33e1793
to
68c79ea
Compare
68c79ea
to
988bebb
Compare
Pinchflat is a self-hosted app for downloading YouTube content built using yt-dlp. You set up rules for how to download content from YouTube channels or playlists and it'll do the rest, periodically checking for new content. It also tags media in a Plex, Jellyfin, and Kodi compatible manner, and integrates with Sponsorblock.
This PR adds the package itself, as well as a NixOS module for configuring a server install of pinchflat.
This resolves #351127.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.