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

systemd-lock-handler: init at 2.4.1 #228063

Closed

Conversation

MatthewCroughan
Copy link
Contributor

Description of changes

Adds systemd-lock-handler to Nixpkgs

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/)
  • 23.05 Release Notes (or backporting 22.11 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
  • 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 Apr 28, 2023
Copy link
Contributor

@liff liff left a comment

Choose a reason for hiding this comment

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

Should build after fixing the module file.

Comment on lines +12 to +17
package = mkOption {
default = pkgs.systemd-lock-handler;
defaultText = literalExpression "pkgs.systemd-lock-handler";
type = types.package;
description = lib.mdDoc "systemd-lock-handler package to use.";
};
Copy link
Contributor

Choose a reason for hiding this comment

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

There seems to be a helper, like mkEnableOption, for this:

Suggested change
package = mkOption {
default = pkgs.systemd-lock-handler;
defaultText = literalExpression "pkgs.systemd-lock-handler";
type = types.package;
description = lib.mdDoc "systemd-lock-handler package to use.";
};
package = mkPackageOption pkgs "systemd-lock-handler" { };

type = types.package;
description = lib.mdDoc "systemd-lock-handler package to use.";
};
config = mkIf cfg.enable {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is nested inside options.services.systemd-lock-handler (hence the build failure), so there should be a }; before this.

serviceConfig = {
Documentation = "https://sr.ht/~whynothugo/systemd-lock-handler";
Slice = [ "session.slice" ];
ExecStart = "${cfg.package}/bin/systemd-lock-handler";
Copy link
Contributor

@liff liff Jul 20, 2023

Choose a reason for hiding this comment

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

Suggested change
ExecStart = "${cfg.package}/bin/systemd-lock-handler";
ExecStart = getExe cfg.package


buildGoModule rec {
pname = "systemd-lock-handler";
version = "2.4.1";
Copy link
Contributor

Choose a reason for hiding this comment

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

Version 2.4.2 has been released.

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps also add updateScript?

  passthru.updateScript = nix-update-script { };

@liff
Copy link
Contributor

liff commented Jul 20, 2023

Have been looking into using this so would like to see it get in :)

@h7x4 h7x4 added the 8.has: module (new) This PR adds a module in `nixos/` label Nov 2, 2023
@wegank wegank added 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 2.status: merge conflict This PR has merge conflicts with the target branch labels Mar 19, 2024
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 20, 2024
@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 4, 2024
@gepbird
Copy link
Contributor

gepbird commented Oct 2, 2024

Superseded by #259196

@gepbird gepbird closed this Oct 2, 2024
@MatthewCroughan MatthewCroughan deleted the mc/systemd-lock-handler branch October 4, 2024 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: merge conflict This PR has merge conflicts with the target branch 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (new) This PR adds a module in `nixos/` 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants