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

Kdeconnect: add sshfs dependency and provide NixOS module #27806

Closed
wants to merge 1 commit into from

Conversation

bkchr
Copy link
Contributor

@bkchr bkchr commented Jul 31, 2017

  • Adds sshfs as runtime dependency with makeWrapper
  • Adds programs.kdeconnect to open required UDP/TCP ports
Motivation for this change

Kdeconnect requires sshfs for opening filesystem connections to android devices. The UDP/TCP ports are required that Kdeconnect can find other devices.

Things done

Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers.

  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

- Adds sshfs as runtime dependency with makeWrapper
- Adds programs.kdeconnect to open required UDP/TCP ports
Copy link
Member

@FRidh FRidh left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. I am not in favor of merging these changes but will keep it open for feedback from others.

  • kdeconnect can indeed use sshfs but I don't think we should make this a required dependency as its not essential for its operation, its just for a certain feature. By installing the program yourself, it ends up on your path and it will function. Yet at the same time, its a tiny package that is added.

  • Having a module is convenient as you just flip a switch and it will work. However, it is my understanding that modules are not intended for user applications but for system services. Furthermore, modules adding programs to environment.systemPackages is somewhat frowned upon as well, even though it is done so extensively in Nixpkgs. Document conventions around environment.systemPackages #12575

@FRidh FRidh changed the title Kdeconnect: Minor fixes and improvements Kdeconnect: add sshfs dependency and provide NixOS module Jul 31, 2017
@bkchr
Copy link
Contributor Author

bkchr commented Jul 31, 2017

Should have tried to install sshfs before modifying the package. Sorry for that!

Hmm, but isn't kdeconnectd a service? It's running in the background as daemon, for me that sounds like a service :D Yeah it would be more like a user service.

My initial intention for this pr was that kdeconnect could not find my android device.Luckily I remembered that Nixos has a firewall and the ports for kdeconnect needs to be opened. This should at least be documented (required open ports and how).

@FRidh
Copy link
Member

FRidh commented Aug 1, 2017

Yeah it would be more like a user service.

Indeed, and NixOS services are mostly system services. This might be something for #9250.

that Nixos has a firewall and the ports for kdeconnect needs to be opened.

Having a service open ports on a firewall is also frowned upon, at least with its current implementation. Please read #19504. The idea of a firewall is to block everything by default unless configured otherwise.

This should at least be documented (required open ports and how).

The firewall is documented in the NixOS manual, https://nixos.org/nixos/manual/index.html#sec-firewall. If you need access to ports you should know that, which means knowing your application, and therefore it is the task of upstream to document that properly. Sure, it may definitely be helpful if we could communicate/suggest somehow that ports need to be opened. Maybe its an idea to use drv.meta for that?

@FRidh
Copy link
Member

FRidh commented Aug 13, 2017

There has not been any other feedback so I am closing this.

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

2 participants