Skip to content
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/alps: add hardening, extensible options, test #201521

Merged
merged 3 commits into from
Nov 18, 2022

Conversation

hmenke
Copy link
Member

@hmenke hmenke commented Nov 16, 2022

Description of changes

This PR improves upon the Alps module:

  • Hardening for the systemd unit.
  • Internal options package and args to make it more extensible.
  • NixOS test that spins up a mailserver and then logs into the Alps web interface to check that we can in principle read mail now.

I've also touched up the Alps package:

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Nov 16, 2022
@hmenke
Copy link
Member Author

hmenke commented Nov 16, 2022

@madonius
Copy link

lgtm 👍

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Nov 16, 2022
@hmenke
Copy link
Member Author

hmenke commented Nov 16, 2022

@ofborg test alps

@hmenke hmenke requested a review from booklearner November 17, 2022 09:56
@ofborg ofborg bot requested a review from a user November 17, 2022 10:02
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin labels Nov 17, 2022
Copy link
Member

@booklearner booklearner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! LGTM

@hmenke hmenke added 0.kind: enhancement Add something new 8.has: tests This PR has tests labels Nov 18, 2022
@AndersonTorres AndersonTorres merged commit fc8a4f7 into NixOS:master Nov 18, 2022
nixos/modules/services/web-apps/alps.nix Show resolved Hide resolved
RestrictRealtime = true;
RestrictSUIDSGID = true;
SystemCallArchitectures = "native";
SystemCallFilter = [ "@system-service @resources" "~@privileged @obsolete" ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't @resources crashing with go 1.19?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was ~@resource that causes crashes, but @system-service alone should be enough anyway.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, @NickCao is right. @system-service already includes @resources. The systemd documentation is not so great there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: enhancement Add something new 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: tests This PR has tests 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants