-
-
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
nixos/piped: init module #317817
nixos/piped: init module #317817
Conversation
Result of 1 package blacklisted:
3 packages built:
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/4084 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have some feedback, though the merge conflict also needs to be addressed
root = pkgs.runCommand "piped-frontend-patched" {} '' | ||
cp -r ${cfg.frontend.package} $out | ||
chmod -R +w $out | ||
${pkgs.gnused}/bin/sed -i 's|https://pipedapi.kavin.rocks|${cfg.backend.externalUrl}|g' $out/{opensearch.xml,assets/*} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${pkgs.gnused}/bin/sed -i 's|https://pipedapi.kavin.rocks|${cfg.backend.externalUrl}|g' $out/{opensearch.xml,assets/*} | |
${lib.getExe pkgs.gnused} -i 's|https://pipedapi.kavin.rocks|${cfg.backend.externalUrl}|g' $out/{opensearch.xml,assets/*} |
or adding gnused
to nativeBuildInputs
root = pkgs.runCommand "piped-frontend-patched" {} '' | ||
cp -r ${cfg.frontend.package} $out | ||
chmod -R +w $out | ||
${pkgs.gnused}/bin/sed -i 's|https://pipedapi.kavin.rocks|${cfg.backend.externalUrl}|g' $out/{opensearch.xml,assets/*} | ||
''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems odd to do the rewriting in here. externalUrl
could instead be a parameter for the piped
package.
host = lib.mkOption { | ||
type = lib.types.str; | ||
default = "127.0.0.1"; | ||
description = '' | ||
The database host Piped should use. | ||
''; | ||
}; | ||
|
||
port = lib.mkOption { | ||
type = lib.types.port; | ||
default = config.services.postgresql.settings.port; | ||
defaultText = lib.literalExpression "config.services.postgresql.settings.port"; | ||
description = '' | ||
The database port Piped should use. | ||
|
||
Defaults to the the default postgresql port. | ||
''; | ||
}; | ||
|
||
database = lib.mkOption { | ||
type = lib.types.str; | ||
default = "piped"; | ||
description = '' | ||
The database Piped should use. | ||
''; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a single url
option, which is what piped-backend's config uses anyhow.
domain = lib.mkOption { | ||
type = lib.types.str; | ||
description = '' | ||
The domain Piped Backend is reachable on. | ||
''; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't that redundant with backend.externalUrl
?
Closing in favor of #326238 |
Description of changes
Piped is an alternative privacy-friendly YouTube frontend which is efficient by design.
This pull request adds packages for the Piped frontend, backend and proxy, as well as a NixOS module for setting up a Piped instance.
Homepage: https://github.com/TeamPiped/Piped/
Closes #270008
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.