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: init module #51474

Closed
wants to merge 1 commit into from
Closed

Conversation

eliasp
Copy link
Member

@eliasp eliasp commented Dec 3, 2018

Motivation for this change

I struggled to get KDE Connect working on NixOS until I found out I manually need to open a few ports by adding this to my configuration.nix:

networking.firewall.allowedTCPPortRanges = [ { from = 1714; to = 1764; } ];
networking.firewall.allowedUDPPortRanges = [ { from = 1714; to = 1764; } ];

I wanted to make this a little more discoverable/accessible by providing a global option to enable KDE Connect.

Things done
  • Tested it by:

    • including nixos/modules/programs/kdeconnect.nix in my configuration.nix
    • disabling my previous lines to make KDE Connect work (see above)
    • setting programs.kdeconnect.enable = true;
    • rebuilding my environment
    • testing KDE Connect's functionality (e.g. test-pinging my smartphone from my desktop and vice versa).
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)

  • 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 nox --run "nox-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)

  • Assured whether relevant documentation is up to date

  • Fits CONTRIBUTING.md.


@michaelpj
Copy link
Contributor

This should be perhaps be enabled by the Plasma module?

@michaelpj
Copy link
Contributor

(I was about to say this is unnecessary and then I realised I have the firewall disabled ;) )

@eliasp
Copy link
Member Author

eliasp commented Dec 4, 2018

Good point nonetheless. I haven't verified how this module behaves in case the firewall is disabled.

Adding it to plasma desktop also sounds good!

@Mic92
Copy link
Member

Mic92 commented Dec 4, 2018

When disabling the firewall the rules will just have not effect.

};

config = mkIf config.programs.kdeconnect.enable {
environment.systemPackages = [ pkgs.kdeconnect ];
Copy link
Member

Choose a reason for hiding this comment

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

Would be a systemd.user.service useful here? #51379

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't believe you need that - at least in my experience it seems to startup automatically (in KDE at least). I think there's a dbus service?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm seeing a xdg autostart and the dbus service org.kde.kdeconnect.service.

Copy link
Member

Choose a reason for hiding this comment

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

I have been running a patched version of kdeconnect that actually uses dbus for activation and then starting the systemd unit rather than having the binary be spawned directly by dbus. I really should polish that and submit a PR....

@bkchr
Copy link
Contributor

bkchr commented Mar 6, 2019

Hey, I already made an attempt for this, some time ago here

@FRidh
Copy link
Member

FRidh commented Aug 18, 2019

Closing for the same reason as #27806.

@FRidh FRidh closed this Aug 18, 2019
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

8 participants