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
aws-xray-daemon-V3.0.0 | awx-xray-daemon: init at V3.0.0 #53565
Changes from all commits
2df62c7
44da7a1
d74ea5e
ff54008
466b8ec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ config, lib, pkgs, ... }: | ||
|
||
with lib; | ||
|
||
let | ||
|
||
cfg = config.services.aws-xray-daemon; | ||
|
||
configFile = pkgs.writeText "xray.yaml" cfg.config; | ||
|
||
in | ||
{ | ||
options.services.aws-xray-daemon = { | ||
enable = mkEnableOption "Whether to enable aws-xray-daemon service"; | ||
|
||
package = mkOption { | ||
description = "Which aws-xray-daemon package to use"; | ||
default = pkgs.aws-xray-daemon; | ||
ryantm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
defaultText = "pkgs.aws-xray-daemon"; | ||
type = types.package; | ||
}; | ||
|
||
config = mkOption { | ||
description = "Aws xray configurations json or yaml formatted."; | ||
default = "Version: 2"; | ||
type = types.str; | ||
}; | ||
}; | ||
|
||
config = mkIf cfg.enable { | ||
systemd.services.aws-xray-daemon = { | ||
description = "aws xray daemon service"; | ||
wantedBy = [ "multi-user.target" ]; | ||
after = [ "networking.target" ]; | ||
serviceConfig = { | ||
DynamicUser = true; | ||
ExecStart = "${cfg.package.bin}/bin/daemon --config ${configFile}"; | ||
}; | ||
}; | ||
}; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing final newline |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,24 @@ | ||||||
{ stdenv, buildGoPackage, fetchFromGitHub }: | ||||||
|
||||||
buildGoPackage rec { | ||||||
name = "aws-xray-daemon-${version}"; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
version = "V3.0.0"; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not typical to have the prefix of V in the version, even if it is in the tag or release name.
Suggested change
|
||||||
|
||||||
goPackagePath = "github.com/aws/aws-xray-daemon"; | ||||||
subPackages = [ "daemon" ]; | ||||||
|
||||||
src = fetchFromGitHub { | ||||||
owner = "aws"; | ||||||
repo = "aws-xray-daemon"; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
rev = "${version}"; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
sha256 = "090z5q7iw6y9c0d70z29mxqw55yxxh9d8bnl6lxda72rhmdnvfcq"; | ||||||
}; | ||||||
|
||||||
goDeps = ./deps.nix; | ||||||
|
||||||
meta = { | ||||||
homepage = "https://docs.aws.amazon.com/xray/latest/devguide/xray-daemon.html"; | ||||||
description = "aws X-RAY daemon."; | ||||||
license = stdenv.lib.licenses.asl20; | ||||||
}; | ||||||
} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing final newline |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
The "whether to enable" part gets added automatically.