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/gnunet: create switch for package. #39681
Conversation
@@ -102,6 +102,12 @@ in | |||
}; | |||
}; | |||
|
|||
package = mkOption { | |||
default = pkgs.gnunet; | |||
description = "Overridable attribute of the gnunet package to use."; |
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.
You should add defaultText = "pkgs.gnunet";
.
@@ -130,16 +136,16 @@ in | |||
|
|||
# The user tools that talk to `gnunetd' should come from the same source, | |||
# so install them globally. | |||
environment.systemPackages = [ pkgs.gnunet ]; | |||
environment.systemPackages = [ config.services.gnunet.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.
Please use cfg
instead of config.services.gnunet
.
|
||
systemd.services.gnunet = { | ||
description = "GNUnet"; | ||
after = [ "network.target" ]; | ||
wantedBy = [ "multi-user.target" ]; | ||
path = [ pkgs.gnunet pkgs.miniupnpc ]; | ||
path = [ config.services.gnunet.package pkgs.miniupnpc ]; |
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.
Is the gnunet package really needed in here?
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.
default = pkgs.gnunet; | ||
defaultText = "pkgs.gnunet"; | ||
description = "Overridable attribute of the gnunet package to use."; | ||
example = "pkgs.gnunet_git"; |
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 use example = literalExample "pkgs.gnunet_git"
here.
@@ -102,6 +102,13 @@ in | |||
}; | |||
}; | |||
|
|||
package = mkOption { | |||
default = pkgs.gnunet; |
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.
You should add type = types.package
package = mkOption { | ||
default = pkgs.gnunet; | ||
defaultText = "pkgs.gnunet"; | ||
description = "Overridable attribute of the gnunet package to use."; |
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.
I think this is usually just "Gnunet package to use."
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.
Stole that one from services.matrix-synapse.package
Motivation for this change
Add switch to the gnunet service to make gnunet_git usable with the service.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)Here's the promised switch, @viric