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/howdy: init #216245

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

nixos/howdy: init #216245

wants to merge 5 commits into from

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 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 the maintainer of the package it changes 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 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
nixos/modules/services/misc/linux-enable-ir-emitter.nix Outdated Show resolved Hide resolved
nixos/modules/services/misc/linux-enable-ir-emitter.nix Outdated Show resolved Hide resolved
nixos/modules/services/misc/linux-enable-ir-emitter.nix Outdated Show resolved Hide resolved
nixos/modules/services/security/howdy.nix Outdated Show resolved Hide resolved
nixos/modules/services/security/howdy.nix Outdated Show resolved Hide resolved
pkgs/applications/system/howdy/default.nix Outdated Show resolved Hide resolved
pkgs/applications/system/howdy/default.nix Outdated Show resolved Hide resolved
nixos/modules/services/security/howdy.nix Outdated Show resolved Hide resolved
pkgs/applications/system/howdy/default.nix Outdated Show resolved Hide resolved
@fufexan fufexan force-pushed the howdy branch 4 times, most recently from 762e062 to 7a200d4 Compare February 15, 2023 19:27
@fufexan
Copy link
Contributor Author

fufexan commented Oct 6, 2024

For now, I'd say I had it like 10% of the times I suspended my laptop, not ideal but usable.

On my laptop, it only works 10% of the time. Peculiar behavior.

@louis-thevenet
Copy link
Contributor

For now, I'd say I had it like 10% of the times I suspended my laptop, not ideal but usable.

On my laptop, it only works 10% of the time. Peculiar behavior.

I haven't encountered this issue after several logins, I only encountered a stuck when adding my face. If you're using gnome, I suspect it's due to a bug in gdm(maybe? but I haven't encountered this problem on other distros). When you login too fast after just booting your computer, e.g. using howdy or autologin, it gets stuck. A workaound is to add these:

  systemd.services."getty@tty1".enable = false;
  systemd.services."autovt@tty1".enable = false;

The issue generally occurs when waking up from suspend. Do you often use suspend ?
I use Hyprland and and don't have a DM.

I disabled it for now, it breaks less often than what I read here, but it tends to break at the worst time...
It seems that the more time the system stays in suspend, the more likely it is to occur, but it's just a feeling.

@yechielw
Copy link
Contributor

Sorry for the novice question,

How can I try out the service without changing inputs.nixpkgs.url to github:fufexan/howdy?

I attempted adding the fork as an additional input, importing the relevant services, and setting overlays for the packages, but haven't had success.

Thanks in advance!

@Scrumplex
Copy link
Member

Scrumplex commented Oct 22, 2024

Sorry for the novice question,

How can I try out the service without changing inputs.nixpkgs.url to github:fufexan/howdy?

I attempted adding the fork as an additional input, importing the relevant services, and setting overlays for the packages, but haven't had success.

Thanks in advance!

This is how I would go about with more complex PRs like this:

  1. (Assuming your flake is in ~/flake and you are currently in ~)
  2. Have a local Nixpkgs clone: gh repo clone NixOS/nixpkgs
  3. Make sure it's up-to-date: git fetch --all
  4. Checkout this PR: gh pr checkout 216245
  5. Rebase the commits of this PR onto your desired branch: git rebase --onto 4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0 HEAD~4
    • 4c2fcb0 is the revision of nixos-unstable at the time of writing
    • HEAD~4 selects the commit before the 4th newest commit as the old base
    • Replace 4c2fcb0 with your desired revision of Nixpkgs.
  6. Finally, go into your NixOS flake (cd ~/flake) and temporarily override Nixpkgs: nix flake lock --override-input nixpkgs ~/nixpkgs
  7. Configure the module in your system
  8. Rebuild and Switch!

Edit: To revert this, just restore your flake.lock to its state in the Git index (i.e. git restore -WS flake.lock, This removes all local changes in that file, so run this with care) and remove the configuration

@fufexan
Copy link
Contributor Author

fufexan commented Oct 22, 2024

#76928 (comment) here's a simpler approach.

@PaideiaDilemma
Copy link

linux-enable-ir-emitter-start seems to need /etc/linux-enable-ir-emitter

Nov 02 20:01:50 laptop linux-enable-ir-emitter-start[1239]: terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error'
Nov 02 20:01:50 laptop linux-enable-ir-emitter-start[1239]:   what():  filesystem error: directory iterator cannot open directory: No such file or directory [etc/linux-ena>

works fine when the directory exists

@fufexan
Copy link
Contributor Author

fufexan commented Nov 3, 2024

@PaideiaDilemma should be fixed now.

Can anyone test?

@PaideiaDilemma
Copy link

@fufexan thanks, fixed.

From my point of view it is quite desirable to have this packaged.

However, I think some sort of disclaimer that this is experimental software and not a secure login method would be appropriate. That is missing on the howdy repo as well as on the archwiki, if you ask me. Mainly because howdy is not mature, this targets the beta branch and because I think the pam module is currently not implemented well. (For example problems with unwanted unlocks when the authentication client spawns child processes: boltgolt/howdy#969)

@fufexan
Copy link
Contributor Author

fufexan commented Nov 3, 2024

@PaideiaDilemma you raise a good point. Hopefully the issue you opened is addressed. In the meantime we can separately add the patch.

@fufexan
Copy link
Contributor Author

fufexan commented Nov 3, 2024

@PaideiaDilemma I've added an admonition describing the security implications.

@PaideiaDilemma
Copy link

@fufexan Sounds reasonable.

In the meantime we can separately add the patch.

Yeah, why not.

@PaideiaDilemma
Copy link

PaideiaDilemma commented Nov 3, 2024

@fufexan sorry, forgot to update the the patch in the issue.
use this one. tested it.
patch.txt

@NovaViper
Copy link
Contributor

Hey I just got Howdy back on my system again and now im noticing the IR sensor no longer blinks 😭

Also I notice when it tries to search for my configs, it says etc/linux-enable-ir-emitter/pci-0000:00:14.0-usb-0:6:1.2-video-index0.ini instead of /etc/linux-enable-ir-emitter/pci-0000:00:14.0-usb-0:6:1.2-video-index0.ini

@louis-thevenet
Copy link
Contributor

Tried it yesterday, still have the same behavior

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Nov 9, 2024
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog 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 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.

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