-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Implement Nix Flake #424
Implement Nix Flake #424
Conversation
thanks @ysndr , much appreciated |
flake.nix
Outdated
enable = mkEnableOption "Transfer.sh service"; | ||
listener = mkOption { default = 80; type = types.int; description = "port to use for http (:80)"; }; | ||
profile-listener = mkOption { default = 6060; type = types.int; description = "port to use for profiler (:6060)"; }; | ||
force-https = mkOption { default = null; type = types.nullOr types.bool; description = "redirect to https"; }; |
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.
mkOption
argument default
is null by default.
Also, consider formatting all this with new lines and if you are really against it - define a function's like this:
mkNullOrStrOption = description: mkOption { type = types.nullOr types.str; inherit description; }
flake.nix
Outdated
provider_options = | ||
|
||
{ |
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.
provider_options = | |
{ | |
provider_options = { |
flake.nix
Outdated
else if !cfg.provider.aws.enable && cfg.provider.storj.enable && !cfg.provider.gdrive.enable && !cfg.provider.local.enable then storj-config | ||
else if !cfg.provider.aws.enable && !cfg.provider.storj.enable && cfg.provider.gdrive.enable && !cfg.provider.local.enable then gdrive-config | ||
else if !cfg.provider.aws.enable && !cfg.provider.storj.enable && !cfg.provider.gdrive.enable && cfg.provider.local.enable then local-config | ||
else throw "transfer.sh requires exactly one provider (aws, storj, gdrive)" |
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.
else throw "transfer.sh requires exactly one provider (aws, storj, gdrive)" | |
else throw "transfer.sh requires exactly one provider (aws, storj, drive, local)" |
@ysndr could you explain how to keep the flake update when we bump version? (if it's needed) thanks |
@aspacca The flake defines the build for the entire repository, as long as you do not introduce non-go dependencies its all good. |
all clear, thanks |
@ysndr
If I got it right it's the sh256 of the vendor directory, bumping the version of one dependency should have changed it, so the value should be updated. What's the cons of setting |
…ch-1 * 'patch-1' of github.com:GanZhiXiong/transfer.sh: issue dutchcoders#420 added MaxDate.IsZero() check (dutchcoders#427) fix go1.16, add go1.17 bump bluemonday Revert "issue dutchcoders#420 return 400 response when Max-Days is too big (dutchcoders#422)" (dutchcoders#426) issue dutchcoders#420 return 400 response when Max-Days is too big (dutchcoders#422) Implement Nix Flake (dutchcoders#424) fix missed errors (dutchcoders#417) Fix path (dutchcoders#416) Edited code of condunct for more information and corrected a grammatical error (dutchcoders#421) Update README.md (dutchcoders#415) Update README.md
This PR makes transfer.sh available to the nix works by providing a nixos Module and standalone executable (on non-nixos machines) as well as a default configuration and basic container image definition.