Skip to content

Conversation

@fufexan
Copy link
Contributor

@fufexan fufexan commented Feb 14, 2023

Description of changes

Adds Howdy as a service.

TODO:

  • make sure it can add/recognize/remove facial models.
  • add optional linux-enable-ir-emitter service needed for some IR cameras.
  • get it working properly with PAM.
  • get the GTK version running (may be out of scope for now).

Fixes #76928

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.

closes #344024

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 8.has: module (update) This PR changes an existing module in `nixos/` labels Feb 14, 2023
@fufexan fufexan added 8.has: package (new) This PR adds a new package 8.has: module (new) This PR adds a module in `nixos/` and removed 8.has: module (update) This PR changes an existing module in `nixos/` labels Feb 14, 2023
@fufexan fufexan requested a review from Atemu February 14, 2023 00:32
@adamcstephens adamcstephens self-requested a review February 14, 2023 02:04
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Feb 14, 2023
@Atemu
Copy link
Member

Atemu commented Feb 14, 2023

I don't have the HW to test this.

@Atemu Atemu removed their request for review February 14, 2023 08:54
@fufexan fufexan changed the title howdy: init nixos/howdy: init Feb 14, 2023
@github-actions github-actions bot added the 8.has: module (update) This PR changes an existing module in `nixos/` label Feb 14, 2023
@fufexan fufexan force-pushed the howdy branch 4 times, most recently from 762e062 to 7a200d4 Compare February 15, 2023 19:27
@aprilthepink
Copy link
Contributor

Updated linux-enable-ir-emitter to 6.1.2 which contains my PR, therefore I've dropped the patch.

I've opened two PRs on howdy:

* [howdy-gtk: fix python path finding boltgolt/howdy#1049](https://github.com/boltgolt/howdy/pull/1049)

* [Add option to install config or not boltgolt/howdy#1050](https://github.com/boltgolt/howdy/pull/1050)

When they get merged we can drop the howdy patches as well.

Ready for review in the meantime.

@SuperSandro2000 mind taking a look?

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 3+ This PR was reviewed and approved by three or more persons. and removed 12.approvals: 2 This PR was reviewed and approved by two persons. labels Oct 30, 2025
Comment on lines 55 to 58
preStart = ''
modprobe uvcvideo
sleep 1
'';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added this to match https://github.com/EmixamPP/linux-enable-ir-emitter/blob/master/boot_service/systemd/linux-enable-ir-emitter.service after having the program fail to detect the IR camera until a service restart. Possibly makes sense to remove the dependency on dev-${cfg.device}.device since linux-enable-ir-emitter looks in /sys, not /dev.

@ofborg ofborg bot removed the ofborg-internal-error Ofborg encountered an error label Nov 10, 2025
Copy link
Contributor

@AkechiShiro AkechiShiro left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@Aleksanaa Aleksanaa left a comment

Choose a reason for hiding this comment

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

I'd like to get this in so people can start using it first. Are there any remaining known issues?

@AkechiShiro
Copy link
Contributor

AkechiShiro commented Dec 2, 2025

Just want to mention, I tried executing howdy-gtk just to try in a nixpkgs-review shell and I got the following after entering my password in a popup by polkit for authentification : Error executing /nix/store/9czwf59hwcvgissaw2kzrakdnsj1sgfk-howdy-3.0.0/lib/howdy-gtk/init.py: Permission denied

Maybe a proper way to test this PR would be to use the module/import it and configure it properly, instead of testing inside the nix-shell env.

@AkechiShiro
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 216245
Commit: 983ffd55b5ec17da91e8f4cc2f0a68c37619874c


x86_64-linux

⏩ 2 packages blacklisted:
  • nixos-install-tools
  • tests.nixos-functions.nixos-test
✅ 1 test built:
  • nixosTests.simple
✅ 7 packages built:
  • howdy
  • linux-enable-ir-emitter
  • tests.devShellTools.nixos
  • tests.testers.lycheeLinkCheck.network
  • tests.testers.nixosTest-example
  • tests.testers.runNixOSTest-example (tests.testers.runNixOSTest-extendNixOS)
  • tests.trivial-builders.references

@nixpkgs-ci nixpkgs-ci bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Dec 6, 2025
@AkechiShiro

This comment was marked as duplicate.

@AkechiShiro
Copy link
Contributor

AkechiShiro commented Dec 6, 2025

Hi @fufexan

Sorry again to ping you, could you please solve the merge conflict/rebase the PR please ?

I will try to find more people for reviews and ideally getting this PR merged.

Edit : The mobile GitHub client seems to have duplicated my last comment, I'm surprised.

@D3vil0p3r D3vil0p3r self-requested a review December 6, 2025 13:28
@fufexan
Copy link
Contributor Author

fufexan commented Dec 7, 2025

Just want to mention, I tried executing howdy-gtk just to try in a nixpkgs-review shell and I got the following after entering my password in a popup by polkit for authentification : Error executing /nix/store/9czwf59hwcvgissaw2kzrakdnsj1sgfk-howdy-3.0.0/lib/howdy-gtk/init.py: Permission denied

I'm not sure what's at fault but I suspect it's the python wrapper. If anyone has more experience with python/wrapping/polkit auth, I could use some help.

Sorry again to ping you, could you please solve the merge conflict/rebase the PR please ?

It's not essential for testing and will keep happening until a majority of approvals to merge is reached. I'd rather rebase once that's done if that's fine.

@VuiMuich
Copy link
Contributor

VuiMuich commented Dec 8, 2025

Just want to mention, I tried executing howdy-gtk just to try in a nixpkgs-review shell and I got the following after entering my password in a popup by polkit for authentification : Error executing /nix/store/9czwf59hwcvgissaw2kzrakdnsj1sgfk-howdy-3.0.0/lib/howdy-gtk/init.py: Permission denied

Maybe a proper way to test this PR would be to use the module/import it and configure it properly, instead of testing inside the nix-shell env.

I added this PR as input to my flake and I get the same error also I am not sure if I need to add more then services.howdy.enable = true for it to start working with pam.

@Aleksanaa
Copy link
Member

Aleksanaa commented Dec 8, 2025

I'm not sure what's at fault but I suspect it's the python wrapper. If anyone has more experience with python/wrapping/polkit auth, I could use some help.

The short answer is lib/howdy-gtk/init.py doesn't have executable bit 😅

Wait, it's not

Okay, it is but we still have more problems.
https://github.com/boltgolt/howdy/blob/master/howdy-gtk/src/window.py#L121
https://github.com/barneygale/elevate/blob/master/elevate/posix.py#L51

It is just using pkexec to re-execute current argv0. And it's only passing down arguments, not environment variables 🥶

@nixpkgs-ci nixpkgs-ci bot added 2.status: merge conflict This PR has merge conflicts with the target branch and removed 2.status: merge conflict This PR has merge conflicts with the target branch labels Dec 8, 2025
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 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 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 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. 12.approvals: 3+ This PR was reviewed and approved by three or more persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Package request: Howdy package request: howdy Windows Hello face recognition on linux