Skip to content
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

transmission: use freeformType on settings and various fixes #96655

Merged
merged 4 commits into from Oct 21, 2021

Conversation

ju1m
Copy link
Contributor

@ju1m ju1m commented Aug 30, 2020

Motivation for this change

Leveraging freeformType on services.transmission.settings.

Things done
  • Move settings assertions to options.
  • Alias option port to settings.rpc-port.
  • Alias option openFirewall to openPeerPorts.
  • Add option openRPCPort.
  • Add option settings.trash-original-torrent-files.
  • Add mkDefaults when setting boot.kernel.sysctl.
  • Use <xref linkend="opt-services.transmission.${optionName}"/> in descriptions.
  • Fix transmission: systemctl reload transmission fails with Permissioned denied #135695 by removing the InaccessiblePaths= on the RootDirectory='s path.
  • Remove SystemCallErrorNumber=EPERM which may silent failures to call a disallowed syscalls instead of failing hard with an ESYS, that will enable us to know more easily if we need to relax the SystemCallFilter= (using coredumpctl debug to know which syscall failed).
  • Fix watch-dir creation.
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@aanderse
Copy link
Member

openFirewall is a pretty standard option name across modules. Do we want to leave it in as an alias?

@infinisil
Copy link
Member

@aanderse There's different options for different ports now, openPeerPorts and openRPCPort. I think it makes sense to not use openFirewall to avoid confusion.

@aanderse
Copy link
Member

aanderse commented Sep 3, 2020

@aanderse There's different options for different ports now, openPeerPorts and openRPCPort. I think it makes sense to not use openFirewall to avoid confusion.

I hadn't seen a PR adding that. Great news. I'll look into it 👍 Oh I see... OK 👍

Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to the things below, the descriptions of options downloadDirPermissions and home can be updated to reference the new options.

Also as another improvement to this module: There's homeDir defined in a let in at the top which can be removed (its usages need to be fixed though).

nixos/modules/services/torrent/transmission.nix Outdated Show resolved Hide resolved
nixos/modules/services/torrent/transmission.nix Outdated Show resolved Hide resolved
@ju1m
Copy link
Contributor Author

ju1m commented Oct 24, 2020

In addition to the things below, the descriptions of options downloadDirPermissions and home can be updated to reference the new options.

Done.

Also as another improvement to this module: There's homeDir defined in a let in at the top which can be removed (its usages need to be fixed though).

Done.

@nixos-discourse
Copy link

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/379

@nixos-discourse
Copy link

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/585

@ju1m ju1m changed the title transmission: use freeformType on settings transmission: use freeformType on settings and various fixes Sep 24, 2021
Copy link
Member

@picnoir picnoir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I don't see any obvious migration pitfall here apart from what's already been addressed.

Tested on my personal deployment.

I'll leave it there for 7 days before merging to let @infinisil perform a second pass if he feels like it.

@picnoir
Copy link
Member

picnoir commented Sep 29, 2021

I'd be nice to have some VM tests for this module.

Edit: There are some VM tests, see nixos/tests/bittorent.nix.

@ju1m
Copy link
Contributor Author

ju1m commented Oct 20, 2021

@picnoir picnoir merged commit 670c69c into NixOS:master Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants