-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
autobrr: init at 1.51.0 #287593
base: master
Are you sure you want to change the base?
autobrr: init at 1.51.0 #287593
Conversation
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.
Three commits please:
- maintainers: add av-gal
- autobrr: init at 1.36.0
- nixos/autobrr: init
b9da876
to
f8fbc72
Compare
I think I've addressed all remaining concerns. @ambroisie please let me know if I've missed anything from your original review. |
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.
There should be a settings
option to create config.toml
. See NixOS/rfcs#42.
DynamicUser = true; | ||
StateDirectory = "autobrr"; | ||
StateDirectoryMode = "0700"; | ||
ExecStart = "${pkgs.autobrr}/bin/autobrr --config '${WorkingDirectory}'"; |
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.
ExecStart = "${pkgs.autobrr}/bin/autobrr --config '${WorkingDirectory}'"; | |
ExecStart = "${lib.getExe pkgs.autobrr} --config '${WorkingDirectory}'"; |
|
||
vendorHash = "sha256-SkwSKFEZAmjVnaSowIbrdH667vB5WqNrPuRs/Yh6BLc="; | ||
|
||
preBuild = "cp -r ${autobrr-web}/* web/dist"; |
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.
preBuild = "cp -r ${autobrr-web}/* web/dist"; | |
preBuild = '' | |
cp -r ${autobrr-web}/* web/dist | |
''; |
DynamicUser = true; | ||
StateDirectory = "autobrr"; | ||
StateDirectoryMode = "0700"; | ||
ExecStart = "${pkgs.autobrr}/bin/autobrr --config '${WorkingDirectory}'"; |
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.
Where is WorkingDirectory
defined?
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.
And please use lib.getExe
:
ExecStart = "${pkgs.autobrr}/bin/autobrr --config '${WorkingDirectory}'"; | |
ExecStart = "${lib.getExe pkgs.autobrr} --config '${WorkingDirectory}'"; |
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.
We don't necessarily need WorkingDirectory
@@ -0,0 +1,70 @@ | |||
{ config, pkgs, lib, ... }: | |||
|
|||
with lib; |
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.
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.
Just prefix the used library function with lib.
.
We just released v1.38.0 so might be a good idea to bump the version in this pr 😄 |
Is this still being worked on? |
I plan on picking this up again shortly. |
Great! The move to pnpm was the most recent big build related changes but other than that it should be smooth sailing. Current version is 1.50.0 :) |
Can I assist you with anything? |
I think I've got it mostly figured out. I'm just not sure how to handle the session secret. Ideally autobrr's config.toml would be created from the NixOS module's settings, but I believe this would cause it to be added to the nix store. Which is problematic, since the nix store is world-readable, and that file also contains the secret for cookie authentication. Any suggestions on how to avoid this? |
https://github.com/autobrr/autobrr/blob/e2df1e4fb8e501fbf1b81b1878c2ae472bf7d62b/internal/config/config.go#L246-L354 |
Description of changes
Reopening #283389. Closes #224560.
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.