-
Notifications
You must be signed in to change notification settings - Fork 3
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
Rework NixOS module #47
Conversation
This is a draft. This PR changes the provided NixOS module to adjust to recent changes to the codebase. It fails to build at hardening steps. Since this is not my area of expertise I'm happy to ask for help. TODO - Fix hardening - Implement MIME mapping - Implement custom_index and static_files paths - Implement url_prefix Please note: This commit would also change src from locally to fetchFromGitHub; please adjust accordingly if this ain't wanted.
Furthermore Go is sourced from |
The previous work-around with fetching buildGo121Module from nixpkgs-unstable is not need anymore, since we're on NixOS 23.11 now.
I am not that keen to accomplish the TODOs from my first comment here, so maybe lets drop the support for NixOS? Otherwise, I just pushed some small changes for the packaging instructions. |
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.
Thanks for your PR and please excuse my very late reply.
Furthermore Go is sourced from
nixpkgs-unstable
since v1.21 is not in stable yet.
With NixOS 23.11 this is no longer an issue :>
I am not that keen to accomplish the TODOs from my first comment here, so maybe lets drop the support for NixOS?
I'd like to keep the NixOS support. Otherwise, I'd also could take another look at it.
Otherwise, I just pushed some small changes for the packaging instructions.
If you just want to tackle this first, feel free.
@@ -20,6 +25,51 @@ let | |||
map (x: "${x.from} ${x.to}") cfg.mimeMap); | |||
|
|||
cfg = config.services.gosh; | |||
|
|||
goshConfig = pkgs.writeText "gosh.yml" '' |
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 take a look at pkgs.formats.toml
. One could drastically simplify the module by just passing the configuration as a types.attrs
or types.submodule
.
# TODO: One has to configure this one. | ||
vendorSha256 = "0000000000000000000000000000000000000000000000000000"; | ||
vendorHash = "sha256-TcrUG8k/SxDqXgnzYqS1hWNAnAHswbWuBoQ+nSYdBBk="; |
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 explicitly have not defined a revision as this will lead to breakages and, thus, the end user has to explicitly define which revision should be used. Otherwise, this have to be bumped for every other commit.
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.
At least this change should be done before NixOS 24.05, because:
trace: warning:
vendorSha256
is deprecated. UsevendorHash
instead
Bump, since NixOS 24.05 is rushing torwards us. I'd switch to OpenBSD deployment though. |
Just upgraded to NixOS 24.05, and let's just drop the official support. It was too exhausting. 👍 |
This is a draft.
This PR changes the provided NixOS module to adjust to recent changes to the codebase. It fails to build at hardening steps. Since this is not my area of expertise I'm happy to ask for help.
TODO
Please note: This commit would also change src from locally to fetchFromGitHub; please adjust accordingly if this ain't wanted.