-
-
Notifications
You must be signed in to change notification settings - Fork 15.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
nixos/kdeconnect: Added programs.kdeconnect option #63899
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.
Diff looks good to me.
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.
Please update commit message to "nixos: add programs.kdeconnect option" and add an "...openFirewall" boolean option that defaults to false.
default = pkgs.kdeconnect; | ||
type = types.package; | ||
description='' | ||
The package providing the implementation for kdeconnect |
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.
Missing period at end of sentence.
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.
Please squash fixup commit. And this still applies: Please update commit message to "nixos: add programs.kdeconnect option" and add an "...openFirewall" boolean option that defaults to false.
On 16/09/19 13:50, Bjørn Forsman wrote:
@bjornfor requested changes on this pull request.
add an "...openFirewall" boolean option that defaults to false.
Kdeconnect won't work at all without those ports open,and it won't even give any error message
|
Right. But most nixos options don't automatically open the firewall, even though opening the firewall is the "correct" thing to do in many cases. I guess this is a bit different than running a webserver, since that can be accessed via localhost, whereas for this program that doesn't make sense. On the other hand, you're pretty likely to see the openFirewall option when you search for kdeconnect in nixos config options. Let's get input from other community members. Please fix git history so that it's ready to merge. |
I guess another reason to not open ports by default is that users might be running other things on those ports already, which would then be open for anybody. An You could also add {
assertions = [{
assertion = cfg.openFirewall;
message = "You need to enable `programs.kdeconnect.openFirewall` to use KDEConnect, which opens ports ${portRange}.";
}];
} to make sure it's enabled. |
@infinisil I don't like that a module needs 2 flags set to true when any other module only requre 1,with maybe some other more specific configuration. |
let | ||
cfg = config.programs.kdeconnect; | ||
in mkIf cfg.enable { | ||
environment.systemPackages = [cfg.package]; |
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.
Perhaps also add gsconnect to systemPackages, if desktop is gnome 3?
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.
Maybe in a further commit
Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly:
|
Still waiting on @infinisil 'S 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 are some format issues. You can run nix run nixpkgs.nixpkgs-fmt -c nixpkgs-fmt <path_to_nix_file>
to fix most of them.
Also I agree the comment #63899 (review) that it's better to squash all commits and tweak commit message.
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
@pasqui23 you still have some typos mentioned in the reviews not fixed in current state of the PR. |
I didn't mean to remove @infinisil >.> I'll try and get around to making the changes sometime if it's still open later |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
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.
options.programs.kdeconnect = { | ||
enable = mkEnableOption '' | ||
kdeconnect.Note that it will open the TCP and UDP port from | ||
1714 to 1764 as they are needed for its correct working |
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.
1714 to 1764 as they are needed for its correct working | |
1714 to 1764 as they are needed for it to function properly. | |
You can use the <option>package</option> to use | |
<code>gnomeExtensions.gsconnect</code> as an alternative | |
implementation if you use Gnome. |
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.
LGTM. Not sure if gsconnect
should go here.
Does this have any integration with plasma? Should enabling plasma also enable this option? |
I don't think so, I'm using it on windows too and there is gsconnect for GNOME. This is mostly so it opens the right ports. |
I guess this looks good after a squash |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
@infinisil I've squashed all the commits in one. Are there any other blockers? |
Let's merge this old PR :). |
Motivation for this change
KdeConnect requires to open TCP and UDP ports to work properly
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)