jmx domain for tomcat may not be Catalina

Output of the info page
===============
Agent (v7.31.0)
===============

  Status date: 2021-09-25 02:33:01.202 PDT / 2021-09-25 09:33:01.202 UTC<PHONE_NUMBER>202)
  Agent start: 2021-09-25 01:15:13.884 PDT / 2021-09-25 08:15:13.884 UTC<PHONE_NUMBER>884)
  Pid: 1
  Go Version: go1.15.13
  Python Version: 3.8.11
  Build arch: amd64
  Agent flavor: agent
  Check Runners: 11
  Log Level: INFO

  Host Info
  =========
    bootTime: 2021-09-13 23:44:47 PDT / 2021-09-14 06:44:47 UTC<PHONE_NUMBER>000)
    kernelArch: x86_64
    kernelVersion: 5.4.120+
    os: linux
    platform: ubuntu
    platformFamily: debian
    platformVersion: 21.04
    procs: 247
    uptime: 265h30m36s
    virtualizationRole: guest

========
JMXFetch
========

  Information
  ==================
    runtime_version : 11.0.11
    version : 0.44.3

Steps to reproduce the issue:

Run a container with embeded tomcat (e.g. spring boot) with JMX enabled
Configure the jmx for the service

Describe the results you received:
Agents only collects the basic jvm metrics
Describe the results you expected:
Agents should get the tomcat metrics such as tomcat.threads.max

This is because Datadog default metrics.yaml file incorrectly assume Catalina domain for JMX metrics - see https://github.com/DataDog/integrations-core/pull/7054
However, the domain will be just Tomcat under embedded tomcat. When I change the domain from Catalina to Tomcat for a metric, agents correctly collected the metrics.
What about updating metrics.yaml to have entries for both Catalina and Tomcat? Or at least it should be mentioned somewhere in the doc.
See also

https://github.com/micrometer-metrics/micrometer/issues/1438
https://bz.apache.org/bugzilla/show_bug.cgi?id=60927

Hi @chulkilee, thanks for making this report. We haven't had too many other reports of this issue, but I can update the documentation to mention that the domain name can be updated to Tomcat in the metrics.yaml if the metrics aren't getting collected. In the meantime, you can configure the metrics.yaml file to collect metrics with the Tomcat domain name. If we get more reports of this, we can update the default configuration to include both bean names.

Hi @rr-paras-patel, apologies for the delay. The domain name was added to the filter configuration in https://github.com/DataDog/integrations-core/pull/7054 to address a problem of increased agent CPU and intermittent halted JMX metrics collection. Customizing the tomcat.yaml according to your environment is the recommended approach. We'll continue tracking reports of this issue and revisit if there are additional reports. Thank you!

What about adding two sets of rules (for Tomcat and Catalina) by default?

I might be nice to re-open this issue to support both Tomcat and Catalina by default.
I have create a pull request for this. Thanks.


Register-SecretVault allows registering same extension vault more than once

Seems like it should detect that an extension vault has already been registered and quietly succeed rather than registering more than once.

In addition to that it allows the -DefaultVault to be used even if an vault is registered as default.

@SteveL-MSFT  Please provide repro steps.  We already check vault name and allow only one registered, so I assume you mean we should disallow registering the same extension vault under different names?

I assume you mean we should disallow registering the same extension vault under different names?

I think it could be useful to allow registering the same extension vault under different names, so a user's secrets can be categorized.

@PaulHigin yes, same vault extension under different names.  In my case, I had just installed a newer version of SecretStore and re-registered it.  When enumerating the vaults, I saw I had registered SecretStore twice under different names and one was default and the other wasn't.  Since the secrets are stored in the same vault, I don't think there's a use case to support this.

Since the secrets are stored in the same vault, I don't think there's a use case to support this.

If the secrets are stored in the same place for both registered vault, then I agree that we should disallow registering the same extension more than once.

Also related: https://github.com/PowerShell/SecretStore/issues/35

A use case we discussed is for extension vaults that support partitions or namespaces.  In this case, it would make sense to allow multiple registrations where each one is registered to a specific namespace within that vault.

Closing as by design-- a user may want to use the say extension vault multiple times with different configurations


Turning off Vsync seems to have no effect

Godot version:

241e709462cd90d3daade3c6a05ff130fe85b4c0
OS/device including version:

OS: Windows 10 2004
CPU: AMD Ryzen 7 3700X
GPU: AMD Radeon RX 580 (driver version: <IP_ADDRESS>-200711a-357168E-RadeonSoftwareAdrenalin2020)
backend: Vulkan
Issue description:

After disabling Vsync under  (and restarting the editor) my test project still runs on 60FPS, which is equal to my monitors refresh rate. I know, Vsync should always be turned on to avoid screen tearing, but as the option to disable it is available, turning it off should have an effect.
Steps to reproduce:

Create a new project
Disable Vsync under Project Settings>General>Display>Window>Vsync
Enable "Print Fps" under Project Settings>General>Debug>Settings
(Not necessary)Adding a Camera3D, MeshInstance3D and WorldEnvironment to the scene
Run the scene

Minimal reproduction project:
vsync_test_project.zip

Duplicate of #36467.


Access job instance from inside method

I'm just wondering if it can be made possible to access the job from inside the method, e.g. like this:
class Post < ActiveRecord::Base
  extend ActiveJob::Performs

  performs :publish

  def publish
     job # <-- The job currently running this method
  end
end

I've some methods for reporting the execution state for this job (e.g. job.percent_done(21)), but for this I need the job instance.
Maybe it could be passed optionally as a kword argument if defined?
class Post < ActiveRecord::Base
  extend ActiveJob::Performs

  performs :publish, pass_job: true

  def publish(job: nil)
     job
  end
end

... which would generate something like ...
  class PublishJob < Job
    def perform(post, *arguments, **options)
      options[:job] = self if pass_job?
      post.publish(*arguments, **options)
    end
  end

Or do you think this is out of scope for this gem?

@doits hey, sorry for the long wait here! This is a pretty specific use-case so I think this is out of scope for the gem.
I still need to document this, but you can define perform manually via the block:
performs :publish do
  def perform(post) = post.publish(job: self)
end

That might work if this is for a one-off case.
In general though, I'd probably make the metrics service available to the domain model object too, so it doesn't need to care about being run in a job or not.
Thanks again for the issue!


Game Crash 1.20 Preview when Cracker is enabled and new Chunks are loaded

Game keeps crashing when Cracker is enabled and new Chunks are loaded.
Error Code:
The game crashed whilst unexpected error
Error: java.lang.IllegalAccessError: class
kaptainwutax.seedcrackerX.finder.Finder tried to access
private field net.minecraft.class_1297.field_6002
(kaptainwutax.seedcrackerX.finder.Finder and net.minecraft.class_1297 are in unnamed module of loader net.fabricmc.loader.impl.launch.knot.KnotClassLoader
@62e136d3)
crash-2023-06-08_10.37.59-client.txt

how can i disable the outlines without crashing or using the GUI

Hey, could you also send your crash report please? Thank you.

hi im facing a issue where i crash im in a 1.20 server it only happens when i put the seedcracker


Now compatible with Philipp's AnnData class

great stuff 😄

no, not great, but it work's and one should now be much better settled for the future with AnnData.
for example, the gene plots and different subgroups work. if you have a good suggestion for a default color map for continuous and categorial columns in smp, I'm very happy to adapt it. :)
https://github.com/falexwolf/collab_alex/blob/master/scanpy/examples/maehr17.md
or here directly in the main readme
https://github.com/theislab/scanpy#moignard15


Implemented find(), find_if(). Added unit tests.

Proposed changes
Implemented find and find_if functions. find returns an iterator to the first element that compares equal to the target value. find_if returns an iterator to the first element that returns true from a predicate function.
Types of changes
What types of changes does your code introduce?
Put an x in the boxes that apply

[ ] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

[ ] I have read the CONTRIBUTING doc
[ ] Unit tests pass locally with my changes
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have added necessary documentation (if appropriate)

Codecov Report

Merging #49 into master will decrease coverage by 0.17%.
The diff coverage is 96.29%.

@@            Coverage Diff             @@
##           master      #49      +/-   ##
==========================================
- Coverage     100%   99.82%   -0.18%
==========================================
  Files           5        5
  Lines         532      557      +25
==========================================
+ Hits          532      556      +24
- Misses          0        1       +1

Impacted Files
Coverage Δ

src/linkedList.cpp
100% <100%> (ø)
:arrow_up:

tests/linkedListTest.cpp
99.72% <93.75%> (-0.28%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3810eea...26123c3. Read the comment docs.

We can ignore the codecov error. Somehow during generation of the coverage report, the lambda used in the find_if tests was not counted.


Top-level "metadata" property gives schema error (arm-template-language-samples/subscription-level.json)

metadata property name is not allowed by schema.
{
  "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  "contentVersion": "<IP_ADDRESS>",
  "metadata": {
    "comments": "This template was developed for demonstration purposes.",
    "author": "Example Name"
  }
}

From internal 1012865

[ ] Enable the "subscription-level.json" suite

@anthony-c-martin do you have any thoughts on this?

Related to https://github.com/Azure/azure-resource-manager-schemas/issues/1079.
I think it would be worthwhile modeling "metadata" in our template schemas to fix this.

Yay!


Adding Team User

You can't add a team user unless they are already in the system.
So, you would have to add them under people for any team before they can be added as a team permission.

Think this is now resolved.


RHOARDOC-1601: Rename RH Developer Studio to CodeReady Studio

JIRA ID: RHOARDOC-1601
JIRA Link: https://issues.jboss.org/browse/RHOARDOC-1601
Analysis document: https://docs.google.com/document/d/1gS1h7fZKn-UFCYANX8kH4poOl1DhZJkLPi3Ye21oXiY/edit?usp=sharing

Can one of the admins verify this patch?

ok to test

While working at another activity, I found an occurrence of JBDS, which we definitely want to replace as well: https://raw.githubusercontent.com/fabric8-launcher/launcher-documentation/master/docs/topics/proc_updating-your-booster-and-deploying-the-changes.adoc . @theashiot, please replace that as well.

@gastaldi, can you please have a look at this? We need an engineering review for every PR and I have a feeling you're the one I haven't pestered with anything for longest. Thanks. :)

@tradej LGTM. That's fine, it's always a pleasure to help :wink:

@gastaldi Much appreciated, thanks. :)

Hi @tradej,
Thanks for providing feedback. I have made the suggested changes in the commit 8ddb1c1e90d2ab31180a05ddd17c4b5b62a59372. A summary of changes:

Retain the KBase article name and add normal text indicating the name change.
Update JBDS to {DevStudio}

I checked the documents again and did not find any other instance of JBDS.
Please review the changes.
best,
ashwin
Noteworthy - the xref is still called "using-red-hat-jboss-developer-studio-with-a-booster-project" because the assembly it refers to has the id: [id='using-red-hat-jboss-developer-studio-with-a-booster-project_{context}']. IMHO we should let it be for now as this is an internal detail. I'm always cautious when it comes to changing IDs as it usually results in some doc in the wild returning a 404. This will be an interesting topic to discuss in mod docs OpenHours methinks.


fix(gitlab): added support for on-premise gitlab, first name and last name

Hello!
The current Gitlab implementation does not support the use of authentication via on-premise Gitlab.
In order not to make patches on the client side, I'm making a small edit that adds only one parameter for init the provider with the default value.

@tomasvotava
A few important comments on the improvements.

I took into account the comments above, but I still had to specify the type str for base_endpoint_url in order to make friends with mypy with a minimum number of edits.
At the same time, I added the extraction of the first and last name, which works safely in all scenarios, even if the name is empty in the profile. Previously, the provider ignored the username — which is not very good.
I needed to slightly change the parameterization of the tests so that several scenarios could be described for one provider. This is done in order to cover the Gitlab provider completely. The main change is that I have abandoned the dictionary in favor of tuples.


Try to put back codecov integration

I only want to keep this page updated https://codecov.io/gh/rtfd/readthedocs.org, not activate the PR checks :)

Only coverage upload is activated now, PR checks are dissabled


[fix] QDA - covariance matrices

:bug: :bug: :bug:
Chapter name
Supervised Classification - QDA
Location
Definition QDA
Description & proposed fix
Some students think that LDA is not a special case of QDA but that LDA and QDA are mutually exclusive
Fix: Change wording to something like "in QDA, Sigma_k may vary"

should be clear now, "QDA is a generalization of LDA" in bold


Write upgrade guide for 0.29 -> 0.30

We made a shitload of huge changes, we really should write a guide going over large changes.
(Maybe incomplete) list of significant changes:

[ ] moved stuff - summary of what moved where
[ ] script changes (unsized types etc)
[ ] lock types
[ ] new hash_newtype syntax
[ ] Taproot changes
[ ] sighash changes
[ ] Address changes
[ ] bunch of newtypes

BTW, looking at all that stuff, we did insane amount of work...

I really like this idea. It would be good to start a series on the website.

Please see: https://github.com/rust-bitcoin/www.rust-bitcoin.org/pull/2

This can be closed now


Issue on the README documentation

Hi,
Thanks for your wonderful gem. I have faced some problems while following your README guideline . When I try accessing page http://<- root_url ->/swagger/docs, it shows me
  No route matches [GET] "/swagger/docs"
But when I do http://<- root_url ->/swagger/doc, it works fine.
Is it just me?

It might be a typo. I'll try to take a look.

You're correct, both here: https://github.com/tpitale/swagger_yard/blob/master/app/controllers/swagger_yard/swagger_controller.rb#L18 and in the routes use '/doc'. I'll update the README.

Updated: 01e095a1fcde4ea38a15bc9fceb18a3c93b0d8c9

Thanks :smile:


Plugin for ReCaptcha

Have been looking around for a way to get a valid ReCaptcha token in Flutter. Seems like the only plugin right now is this one https://pub.dev/packages/flutter_recaptcha_v2
Which as far as I understand passes your key & secret to a private firebase project (sketchy)
Use case
ReCaptcha is incredibly helpful for figuring out whether the user of your app is a human or a bot, and a common workflow is to require a valid ReCaptcha token to login, sign up, etc.
Proposal
An official Plugin that pops open a webview for users to fill out a ReCaptcha form and returns a success token or error.

any update on this?

I've created a new package:
flutter_firebase_recaptcha
The package uses InAppWebView for recapcha HTML rendering.
My widget supports 'visible' and 'invisible' recapcha. Invisible recapcha allows you try to get recapcha token without showing anything to your user.

Based on the updated guidance in https://github.com/flutter/flutter/wiki/Issue-hygiene#closing-issues, I'm going to close this issue, better reflecting the expectation that this is not something that the Flutter team plans to implement.


Help with raw text from feeds

Can a raw_text or summary field be added for each feed?
Could be a list (per images)

A summary would be possible. Both Atom and JSON-Feed define a summary as a possible field for an entry. A short summary/description is also served as plain text without format by the Hoyolab API. Is this what you would like to have? If not, please elaborate on your idea!
Please note, that this project aims on providing valid (RSS) feeds in Atom and JSON-Feed format. Custom fields that do not correspond to the standards will not be accepted.

Yup this works, thank you

Alright, I will try to implement it, when I find the time for it!

Implemented in v2.4.1 (#17). The hosted feeds are also updated now.

Thank you 😊


Routing: ipsec route not applied for IPSec route-based interface after reboot

Describe the bug
Given I have a route-based IPSec VPN
Given I have this VPN with connection method "start immediate"
Given I have manual routes for this network (routes using VPN interface)
If i reboot OPNSense server, route are applied before VPN interface came up.
As VPN isn't yet UP, VPN routes are not applied.
When VPN came up, I need to manually re-apply route in order to have ipsec rules UP
Expected behavior
VPN routes should be also applied after VPN came UP

Probably #3414, but missing basic info.

A basic setup (two machines connected using VTI, static route setup between them), does work on our end after reboots.

Maybe there is a process or service where IPsec comes up too late?

Sorry for this case, as fichtner say, I confirm that this is a Duplicate of https://github.com/opnsense/core/issues/3414#
I close this case so we can continue on #3414
Thank you all for your reactivity

@mimugmail logically the status from IPsec shouldn't matter that much, since vti is setup separately as a "dump" tunnel device in ipsec_configure_vti. I haven't seen it fail before.

Post #3414 updated


nixos/howdy: init

Description of changes
Adds Howdy as a service.
TODO:

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

Fixes https://github.com/NixOS/nixpkgs/issues/76928

Things done

Built on platform(s)

[x] 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:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] 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
[x] 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
[x] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

I don't have the HW to test this.

I've added a settings option of type ini. It will override the modified keys of the original config, because I howdy doesn't look like it has a builtin default config.

I did have to manually configure the IR emitter, not sure there's a better alternative.

The next best thing I can imagine is having a driverConfig file in the linux-enable-ir-emitter module where you can put the generated file so you don't need to run the setup again on subsequent reinstalls/removals of the file.

Confirmed this works on my Razer blade 14 2021.
I only needed services.howdy.enable = true;, enrolled my face, then tried sudo. It just works. :+1:

I have removed the config.nix file and related recursions in the module because Howdy already has fallbacks builtin, so missing keys in the config file do not affect it. This simplifies the module a lot.

I'm now working on updating Howdy. Its last update was 4 days ago, and it changed a lot of the code. The patch needs rewriting.

I'm happy to test again once updating is done :)

@GoogleBot42 it's ready for testing.

It seems to not be working anymore using the same config as last time.  Just services.howdy.enable = true; nothing else.
googlebot@ray ~> sudo su
[sudo] password for googlebot: Traceback (most recent call last):
  File "/nix/store/yiyrf0igvkax54spw0lqpgrwfr5gyq8g-howdy-unstable-2023-02-28/lib/security/howdy/compare.py", line 185, in <module>
    video_capture = VideoCapture(config)
  File "/nix/store/yiyrf0igvkax54spw0lqpgrwfr5gyq8g-howdy-unstable-2023-02-28/lib/security/howdy/recorders/video_capture.py", line 35, in __init__
    if not os.path.exists(self.config.get("video", "device_path")):
  File "/nix/store/iw1vmh509hcbby8dbpsaanbri4zsq7dj-python3-3.10.10/lib/python3.10/configparser.py", line 783, in get
    d = self._unify_values(section, vars)
  File "/nix/store/iw1vmh509hcbby8dbpsaanbri4zsq7dj-python3-3.10.10/lib/python3.10/configparser.py", line 1154, in _unify_values
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'video'

nknown error:
Sorry, try again.
[sudo] password for googlebot: Traceback (most recent call last):
  File "/nix/store/yiyrf0igvkax54spw0lqpgrwfr5gyq8g-howdy-unstable-2023-02-28/lib/security/howdy/compare.py", line 185, in <module>
    video_capture = VideoCapture(config)
  File "/nix/store/yiyrf0igvkax54spw0lqpgrwfr5gyq8g-howdy-unstable-2023-02-28/lib/security/howdy/recorders/video_capture.py", line 35, in __init__
    if not os.path.exists(self.config.get("video", "device_path")):
  File "/nix/store/iw1vmh509hcbby8dbpsaanbri4zsq7dj-python3-3.10.10/lib/python3.10/configparser.py", line 783, in get
    d = self._unify_values(section, vars)
  File "/nix/store/iw1vmh509hcbby8dbpsaanbri4zsq7dj-python3-3.10.10/lib/python3.10/configparser.py", line 1154, in _unify_values
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'video'

nknown error:
Sorry, try again.
[sudo] password for googlebot: Traceback (most recent call last):
  File "/nix/store/yiyrf0igvkax54spw0lqpgrwfr5gyq8g-howdy-unstable-2023-02-28/lib/security/howdy/compare.py", line 185, in <module>
    video_capture = VideoCapture(config)
  File "/nix/store/yiyrf0igvkax54spw0lqpgrwfr5gyq8g-howdy-unstable-2023-02-28/lib/security/howdy/recorders/video_capture.py", line 35, in __init__
    if not os.path.exists(self.config.get("video", "device_path")):
  File "/nix/store/iw1vmh509hcbby8dbpsaanbri4zsq7dj-python3-3.10.10/lib/python3.10/configparser.py", line 783, in get
    d = self._unify_values(section, vars)
  File "/nix/store/iw1vmh509hcbby8dbpsaanbri4zsq7dj-python3-3.10.10/lib/python3.10/configparser.py", line 1154, in _unify_values
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'video'

nknown error:
sudo: 3 incorrect password attempts
googlebot@ray ~ [1]>

I don't know how PAM works but it is a bit strange that it says 3 incorrect password attempts since I did not type anything at all.

I used the entirety of the old config.nix as my services.howdy.settings and that works.  I think that those defaults aren't being applied.

@GoogleBot42 you're right, I will try to set defaults for missing config options upstream.

@GoogleBot42 can you override the howdy package to point its src to this commit? https://github.com/fufexan/howdy/commit/dceebf0f194e55429baaf9696ed5ae38ab9ddf92
It works for me, but for some reason doesn't work in swaylock.

Unfortunately, I get the same error as before
googlebot@ray ~ [1]> sudo su
[sudo] password for googlebot: Traceback (most recent call last):
  File "/nix/store/pk915qzpwq122xhx8xiwg3iy27iryf4m-howdy-unstable-2023-02-28/lib/security/howdy/compare.py", line 185, in <module>
    video_capture = VideoCapture(config)
  File "/nix/store/pk915qzpwq122xhx8xiwg3iy27iryf4m-howdy-unstable-2023-02-28/lib/security/howdy/recorders/video_capture.py", line 35, in __init__
    if not os.path.exists(self.config.get("video", "device_path")):
  File "/nix/store/iw1vmh509hcbby8dbpsaanbri4zsq7dj-python3-3.10.10/lib/python3.10/configparser.py", line 783, in get
    d = self._unify_values(section, vars)
  File "/nix/store/iw1vmh509hcbby8dbpsaanbri4zsq7dj-python3-3.10.10/lib/python3.10/configparser.py", line 1154, in _unify_values
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'video'

This is the config I'm using.
  services.howdy.enable = true;

  nixpkgs.overlays = [
    (final: prev: {
      howdy = prev.howdy.overrideAttrs (old: {
        src = prev.fetchFromGitHub {
          owner = "fufexan";
          repo = "howdy";
          rev = "dceebf0f194e55429baaf9696ed5ae38ab9ddf92";
          hash = "sha256-6C8AqB83pJ5LMq+0JdsrMfkGNxxn1uv8jfoCe8BAGeY=";
        };
      });
    })
  ];

@fufexan  Ok here's the two most minimal configs that can work for me.  One with the commit you made to howdy and one without.
The minimal config without your addition to howdy
{
  services.howdy.enable = true;

  services.howdy.settings = {
    video = {
      timeout = 4;
      device_path = "/dev/video2";
      dark_threshold = 60;
      recording_plugin = "opencv";
    };

    debug = {
      end_report = false;
    };
  };
}

And the minimal config with your change to howdy
{
  services.howdy.enable = true;
  nixpkgs.overlays = [
    (final: prev: {
      howdy = prev.howdy.overrideAttrs (old: {
        src = prev.fetchFromGitHub {
          owner = "fufexan";
          repo = "howdy";
          rev = "dceebf0f194e55429baaf9696ed5ae38ab9ddf92";
          hash = "sha256-6C8AqB83pJ5LMq+0JdsrMfkGNxxn1uv8jfoCe8BAGeY=";
        };
      });
    })
  ];

  services.howdy.settings = {
    video = {
      device_path = "/dev/video2";
    };
  };
}

Seems it doesn't like the config when the video section is undefined and when the device_path isn't defined.  Is this something I'll just need to have in the my config? It might not make sense to default to /dev/video2.

Hmmm I cannot login into sddm anymore using that config.  Probably some other config value is missing as well.  I'll see if I can figure out what later.

I'm encountering some issues with linux-enable-ir-emitter currently. I will try to fix its package and let you know when it's ready. For anyone curious of my issue: https://github.com/EmixamPP/linux-enable-ir-emitter/issues/96.

The issue is now fixed. linux-enable-ir-emitter expected its dir to be created before writing the driver files, which is done by default when installing on most distros, but not NixOS.
With this, I believe the biggest issues were fixed.

I don't need linux-enable-ir-emitter so I cannot really test that.  This new version works great for me.  Just need the one line once again. services.howdy.enable = true;  :+1:

The latest changes allow me to auth with this config
  services.howdy.enable = true;
  services.howdy.settings = {
    video = {
      frame_width = 640;
      frame_height = 320;
    };
  };
  services.linux-enable-ir-emitter.enable = true;

I do get this error on subsequent switches:
/etc/linux-enable-ir-emitter directory contains user files. Symlinking may fail. at /nix/store/rg5rf512szdxmnj9qal3wfdnpfsx38qi-setup-etc.pl line 109.
could not create symlink /etc/linux-enable-ir-emitter at /nix/store/rg5rf512szdxmnj9qal3wfdnpfsx38qi-setup-etc.pl line 133.

And failure to detect a face is a fatal error, where I'd expect it to fall through to the next pam module. This may or may not be an upstream error:
terminate called after throwing an instance of 'std::system_error'
  what():  Invalid argument

@fufexan What's the status on this? Can I help get this in?

@lorenz currently waiting for someone to notice that https://github.com/boltgolt/howdy/issues/768 exists, and hopefully get a fix. It's very annoying, especially because sometimes howdy fails to auth (due to too much light or something), and it just freezes swaylock.
I'd look into the issue myself, but I don't know anything about pam modules.

The coredumpd log you posted (to greetd) contains a stack trace ending in raise, which indicates this is an assertion failure. These are accompanied by the assert message being written to stdout. Do you maybe have the logs from this? That would help in figuring out what is going wrong.

Do you maybe have the logs from this?

Sadly not anymore, as I had to reinstall NixOS on this machine after being sent in for NVMe repairs. I only have swaylock coredumps right now, as the crash hasn't happened in greetd (yet).

So I looked into the code a bit more and if you ask me we'd have to replace the entire PAM stub written in C++ as it does various things which can cause undefined behavior in the process calling PAM. Just replacing it isn't too bad, but the problem is we can no longer have it call out to Python. Either the Python code needs to go or it needs to be moved into a separate daemon. This sadly makes the whole thing basically a rewrite.

 I had a thought a while ago that a rewrite in another lang (C++, Rust?) would be beneficial, but never looked into actually doing it.

I just tried updating to the latest version of howdy and it seems it no longer crashes my KDE Lock screen when it cannot unlock
Is the issue still present for you all

You're right, it seems like it no longer crashes swaylock either.
Still unsure whether we should actually go ahead with this module. Opinions?

Good to hear!

Still unsure whether we should actually go ahead with this module. Opinions?

I'd like to see this merged though I haven't read the full scrollback, so I am not sure about other blockers

Edit: I'll update it anyway in case anyone wants to easily test.

Great!

I'm not going to stand in the way of adding this, but please add a warning somewhere that this makes changes to the environment of the thread/process calling PAM as well as doing other things not allowed in PAM.

ofborg-eval seems to be failing here :/

@SimonBrandner I don't know what that error is supposed to mean, I've rebased on master and built howdy with no error.

Yeah, you're right, it does seem to work just fine on my end as well, sorry for complaining

❯ sudo nixos-rebuild switch --upgrade-all --show-trace
unpacking channels...
unpacking channels...
unpacking channels...
error:
       … while evaluating the attribute 'config'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:326:9:

          325|         options = checked options;
          326|         config = checked (removeAttrs config [ "_module" ]);
             |         ^
          327|         _module = checked (config._module);

       … while evaluating call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:248:28:

          247|           # For definitions that have an associated option
          248|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                            ^
          249|

       … while calling 'mapAttrsRecursiveCond'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:590:5:

          589|     # Attribute set to recursively map over.
          590|     set:
             |     ^
          591|     let

       … while evaluating the attribute 'matchedOptions'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:668:14:

          667|     in {
          668|       inherit matchedOptions;
             |              ^
          669|

       … while evaluating call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:590:21:

          589|       # an attrset 'name' => list of submodules that declare ‘name’.
          590|       declsByName = byName "options" (module: option:
             |                     ^
          591|           [{ inherit (module) _file; options = option; }]

       … while calling 'byName'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:569:25:

          568|       */
          569|       byName = attr: f: modules:
             |                         ^
          570|         zipAttrsWith (n: concatLists)

       … while evaluating call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:240:33:

          239|           ({ inherit lib options config specialArgs; } // specialArgs);
          240|         in mergeModules prefix (reverseList collected);
             |                                 ^
          241|

       … while calling 'reverseList'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:406:17:

          405|   */
          406|   reverseList = xs:
             |                 ^
          407|     let l = length xs; in genList (n: elemAt xs (l - n - 1)) l;

       … while evaluating call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:235:25:

          234|       merged =
          235|         let collected = collectModules
             |                         ^
          236|           class

       … while calling anonymous lambda

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:449:37:

          448|
          449|     in modulesPath: initialModules: args:
             |                                     ^
          450|       filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);

       … while evaluating call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:450:7:

          449|     in modulesPath: initialModules: args:
          450|       filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);
             |       ^
          451|

       … while calling 'filterModules'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:417:36:

          416|       # modules recursively. It returns the final list of unique-by-key modules
          417|       filterModules = modulesPath: { disabled, modules }:
             |                                    ^
          418|         let

       … while evaluating call site

       at «none»:0: (source not available)

       … while calling anonymous lambda

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:443:31:

          442|           disabledKeys = concatMap ({ file, disabled }: map (moduleKey file) disabled) disabled;
          443|           keyFilter = filter (attrs: ! elem attrs.key disabledKeys);
             |                               ^
          444|         in map (attrs: attrs.module) (builtins.genericClosure {

       … while evaluating the attribute 'disabled'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:399:13:

          398|           collectResults = modules: {
          399|             disabled = concatLists (catAttrs "disabled" modules);
             |             ^
          400|             inherit modules;

       … while evaluating the attribute 'disabled'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:399:13:

          398|           collectResults = modules: {
          399|             disabled = concatLists (catAttrs "disabled" modules);
             |             ^
          400|             inherit modules;

       … while evaluating the attribute 'disabled'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:399:13:

          398|           collectResults = modules: {
          399|             disabled = concatLists (catAttrs "disabled" modules);
             |             ^
          400|             inherit modules;

       … while evaluating call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:404:22:

          403|           let
          404|             module = checkModule (loadModule args parentFile "${parentKey}:anon-${toString n}" x);
             |                      ^
          405|             collectedImports = collectStructuredModules module._file module.key module.imports args;

       … while calling anonymous lambda

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:363:11:

          362|         then
          363|           m:
             |           ^
          364|             if m._class != null -> m._class == class

       … while evaluating call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:404:35:

          403|           let
          404|             module = checkModule (loadModule args parentFile "${parentKey}:anon-${toString n}" x);
             |                                   ^
          405|             collectedImports = collectStructuredModules module._file module.key module.imports args;

       … while calling 'loadModule'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:340:53:

          339|       # Like unifyModuleSyntax, but also imports paths and calls functions if necessary
          340|       loadModule = args: fallbackFile: fallbackKey: m:
             |                                                     ^
          341|         if isFunction m then

       … while evaluating call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:341:12:

          340|       loadModule = args: fallbackFile: fallbackKey: m:
          341|         if isFunction m then
             |            ^
          342|           unifyModuleSyntax fallbackFile fallbackKey (applyModuleArgs fallbackKey m args)

       … while calling 'isFunction'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/trivial.nix:448:16:

          447|   */
          448|   isFunction = f: builtins.isFunction f ||
             |                ^
          449|     (f ? __functor && isFunction (f.__functor f));

       … while fetching the input 'github:fufexan/nixpkgs/howdy'

       error: failed to extract archive (truncated gzip input)
building Nix...
error:
       … while evaluating the attribute 'config'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:326:9:

          325|         options = checked options;
          326|         config = checked (removeAttrs config [ "_module" ]);
             |         ^
          327|         _module = checked (config._module);

       … while evaluating call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:248:28:

          247|           # For definitions that have an associated option
          248|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                            ^
          249|

       … while calling 'mapAttrsRecursiveCond'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:590:5:

          589|     # Attribute set to recursively map over.
          590|     set:
             |     ^
          591|     let

       … while evaluating the attribute 'matchedOptions'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:668:14:

          667|     in {
          668|       inherit matchedOptions;
             |              ^
          669|

       … while evaluating call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:590:21:

          589|       # an attrset 'name' => list of submodules that declare ‘name’.
          590|       declsByName = byName "options" (module: option:
             |                     ^
          591|           [{ inherit (module) _file; options = option; }]

       … while calling 'byName'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:569:25:

          568|       */
          569|       byName = attr: f: modules:
             |                         ^
          570|         zipAttrsWith (n: concatLists)

       … while evaluating call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:240:33:

          239|           ({ inherit lib options config specialArgs; } // specialArgs);
          240|         in mergeModules prefix (reverseList collected);
             |                                 ^
          241|

       … while calling 'reverseList'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:406:17:

          405|   */
          406|   reverseList = xs:
             |                 ^
          407|     let l = length xs; in genList (n: elemAt xs (l - n - 1)) l;

       … while evaluating call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:235:25:

          234|       merged =
          235|         let collected = collectModules
             |                         ^
          236|           class

       … while calling anonymous lambda

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:449:37:

          448|
          449|     in modulesPath: initialModules: args:
             |                                     ^
          450|       filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);

       … while evaluating call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:450:7:

          449|     in modulesPath: initialModules: args:
          450|       filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);
             |       ^
          451|

       … while calling 'filterModules'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:417:36:

          416|       # modules recursively. It returns the final list of unique-by-key modules
          417|       filterModules = modulesPath: { disabled, modules }:
             |                                    ^
          418|         let

       … while evaluating call site

       at «none»:0: (source not available)

       … while calling anonymous lambda

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:443:31:

          442|           disabledKeys = concatMap ({ file, disabled }: map (moduleKey file) disabled) disabled;
          443|           keyFilter = filter (attrs: ! elem attrs.key disabledKeys);
             |                               ^
          444|         in map (attrs: attrs.module) (builtins.genericClosure {

       … while evaluating the attribute 'disabled'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:399:13:

          398|           collectResults = modules: {
          399|             disabled = concatLists (catAttrs "disabled" modules);
             |             ^
          400|             inherit modules;

       … while evaluating the attribute 'disabled'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:399:13:

          398|           collectResults = modules: {
          399|             disabled = concatLists (catAttrs "disabled" modules);
             |             ^
          400|             inherit modules;

       … while evaluating the attribute 'disabled'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:399:13:

          398|           collectResults = modules: {
          399|             disabled = concatLists (catAttrs "disabled" modules);
             |             ^
          400|             inherit modules;

       … while evaluating call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:404:22:

          403|           let
          404|             module = checkModule (loadModule args parentFile "${parentKey}:anon-${toString n}" x);
             |                      ^
          405|             collectedImports = collectStructuredModules module._file module.key module.imports args;

       … while calling anonymous lambda

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:363:11:

          362|         then
          363|           m:
             |           ^
          364|             if m._class != null -> m._class == class

       … while evaluating call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:404:35:

          403|           let
          404|             module = checkModule (loadModule args parentFile "${parentKey}:anon-${toString n}" x);
             |                                   ^
          405|             collectedImports = collectStructuredModules module._file module.key module.imports args;

       … while calling 'loadModule'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:340:53:

          339|       # Like unifyModuleSyntax, but also imports paths and calls functions if necessary
          340|       loadModule = args: fallbackFile: fallbackKey: m:
             |                                                     ^
          341|         if isFunction m then

       … while evaluating call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:341:12:

          340|       loadModule = args: fallbackFile: fallbackKey: m:
          341|         if isFunction m then
             |            ^
          342|           unifyModuleSyntax fallbackFile fallbackKey (applyModuleArgs fallbackKey m args)

       … while calling 'isFunction'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/trivial.nix:448:16:

          447|   */
          448|   isFunction = f: builtins.isFunction f ||
             |                ^
          449|     (f ? __functor && isFunction (f.__functor f));

       … while fetching the input 'github:fufexan/nixpkgs/howdy'

       error: failed to extract archive (truncated gzip input)
building the system configuration...
error:
       … while evaluating the attribute 'config.system.build.toplevel'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:326:9:

          325|         options = checked options;
          326|         config = checked (removeAttrs config [ "_module" ]);
             |         ^
          327|         _module = checked (config._module);

       … while evaluating call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:248:28:

          247|           # For definitions that have an associated option
          248|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                            ^
          249|

       … while calling 'mapAttrsRecursiveCond'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:590:5:

          589|     # Attribute set to recursively map over.
          590|     set:
             |     ^
          591|     let

       … while evaluating the attribute 'matchedOptions'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:668:14:

          667|     in {
          668|       inherit matchedOptions;
             |              ^
          669|

       … while evaluating call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:590:21:

          589|       # an attrset 'name' => list of submodules that declare ‘name’.
          590|       declsByName = byName "options" (module: option:
             |                     ^
          591|           [{ inherit (module) _file; options = option; }]

       … while calling 'byName'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:569:25:

          568|       */
          569|       byName = attr: f: modules:
             |                         ^
          570|         zipAttrsWith (n: concatLists)

       … while evaluating call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:240:33:

          239|           ({ inherit lib options config specialArgs; } // specialArgs);
          240|         in mergeModules prefix (reverseList collected);
             |                                 ^
          241|

       … while calling 'reverseList'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:406:17:

          405|   */
          406|   reverseList = xs:
             |                 ^
          407|     let l = length xs; in genList (n: elemAt xs (l - n - 1)) l;

       … while evaluating call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:235:25:

          234|       merged =
          235|         let collected = collectModules
             |                         ^
          236|           class

       … while calling anonymous lambda

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:449:37:

          448|
          449|     in modulesPath: initialModules: args:
             |                                     ^
          450|       filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);

       … while evaluating call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:450:7:

          449|     in modulesPath: initialModules: args:
          450|       filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);
             |       ^
          451|

       … while calling 'filterModules'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:417:36:

          416|       # modules recursively. It returns the final list of unique-by-key modules
          417|       filterModules = modulesPath: { disabled, modules }:
             |                                    ^
          418|         let

       … while evaluating call site

       at «none»:0: (source not available)

       … while calling anonymous lambda

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:443:31:

          442|           disabledKeys = concatMap ({ file, disabled }: map (moduleKey file) disabled) disabled;
          443|           keyFilter = filter (attrs: ! elem attrs.key disabledKeys);
             |                               ^
          444|         in map (attrs: attrs.module) (builtins.genericClosure {

       … while evaluating the attribute 'disabled'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:399:13:

          398|           collectResults = modules: {
          399|             disabled = concatLists (catAttrs "disabled" modules);
             |             ^
          400|             inherit modules;

       … while evaluating the attribute 'disabled'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:399:13:

          398|           collectResults = modules: {
          399|             disabled = concatLists (catAttrs "disabled" modules);
             |             ^
          400|             inherit modules;

       … while evaluating the attribute 'disabled'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:399:13:

          398|           collectResults = modules: {
          399|             disabled = concatLists (catAttrs "disabled" modules);
             |             ^
          400|             inherit modules;

       … while evaluating call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:404:22:

          403|           let
          404|             module = checkModule (loadModule args parentFile "${parentKey}:anon-${toString n}" x);
             |                      ^
          405|             collectedImports = collectStructuredModules module._file module.key module.imports args;

       … while calling anonymous lambda

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:363:11:

          362|         then
          363|           m:
             |           ^
          364|             if m._class != null -> m._class == class

       … while evaluating call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:404:35:

          403|           let
          404|             module = checkModule (loadModule args parentFile "${parentKey}:anon-${toString n}" x);
             |                                   ^
          405|             collectedImports = collectStructuredModules module._file module.key module.imports args;

       … while calling 'loadModule'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:340:53:

          339|       # Like unifyModuleSyntax, but also imports paths and calls functions if necessary
          340|       loadModule = args: fallbackFile: fallbackKey: m:
             |                                                     ^
          341|         if isFunction m then

       … while evaluating call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:341:12:

          340|       loadModule = args: fallbackFile: fallbackKey: m:
          341|         if isFunction m then
             |            ^
          342|           unifyModuleSyntax fallbackFile fallbackKey (applyModuleArgs fallbackKey m args)

       … while calling 'isFunction'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/trivial.nix:448:16:

          447|   */
          448|   isFunction = f: builtins.isFunction f ||
             |                ^
          449|     (f ? __functor && isFunction (f.__functor f));

       … while fetching the input 'github:fufexan/nixpkgs/howdy'

       error: failed to extract archive (truncated gzip input)

The PR no longer works for me... anything I can do to help debug?

Is anyone else seeing this?

Hey how do you add this module? I actually want to go and give this a try on my Yoga 7i

@NovaViper https://github.com/NixOS/nixpkgs/issues/76928#issuecomment-1578237227

Seems to work fine now, FWIW

Hey I got the package installed but in the systemd logs, I get this "CRITICAL: no driver for None has been configured" and the service ends immediately.

@NovaViper have you set the device path? Is the camera device actually /dev/video2 or is it something else?

@NovaViper have you set the device path? Is the camera device actually /dev/video2 or is it something else?

I actually have multiple /dev/video paths, from 0 to 3; but unsure of which one to try

Here's my config of the module
In flake.nix
inputs = {
     nixpkgs-howdy.url = "github:fufexan/nixpkgs/howdy";
}

In howdy.nix
{ inputs, ... }:

{
  disabledModules = [ "security/pam.nix" ];
  imports = [
    "${inputs.nixpkgs-howdy}/nixos/modules/security/pam.nix"
    "${inputs.nixpkgs-howdy}/nixos/modules/services/security/howdy"
    "${inputs.nixpkgs-howdy}/nixos/modules/services/misc/linux-enable-ir-emitter.nix"
  ];

  services = {
    howdy = {
      enable = true;
      package = inputs.nixpkgs-howdy.legacyPackages.x86_64-linux.howdy;
      settings = {
        video.device_path = "/dev/video0";
        # you may not need these
        #core.no_confirmation = true;
        #video.dark_threshold = 90;
      };
    };

    # in case your IR blaster does not blink, run `sudo linux-enable-ir-emitter configure`
    linux-enable-ir-emitter = {
      enable = true;
      package =
        inputs.nixpkgs-howdy.legacyPackages.x86_64-linux.linux-enable-ir-emitter;
    };
  };
}

Usually /dev/video2 is the IR camera. I don't see much info on testing each device.

I don't think the driver's being made during the NixOS rebuild, because when I run sudo linux-enable-ir-emitter --device /dev/video2 run; then it says "no driver for /dev/v4l/by-path/pci-0000:00:14.0-usb-0:6:1.2-video-index0 has been configured" instead of when it's in the systemd service it says "no driver for None has been configured"

Right, the driver cannot be generated as it's an interactive process. That's why you have to run sudo linux-enable-ir-emitter configure manually, once.

Oh huh, it just randomly started working again, I think when I put in

Right, the driver cannot be generated as it's an interactive process. That's why you have to run sudo linux-enable-ir-emitter configure manually, once.

Ah ok! So that's what the systemd service does? I noticed when I ran sudo linux-enable-ir-emitter configure manually the system would say the "/usr/libexec/linux-enable-ir-emitter/driver-generator" is missing.
Also it just randomly started working between me adding services.linux-enable-ir-emitter.device = "video2"; and running the linux-enable-ir-emitter run command a couple of times; not 100% sure what made it work but it works now and it's fast 👍🏾

Right, the driver cannot be generated as it's an interactive process. That's why you have to run sudo linux-enable-ir-emitter configure manually, once.
I just reread this again and realized I made a mistake. That command you mentioned doesn't actually work, it just says the "/usr/libexec/linux-enable-ir-emitter/driver-generator" doesn't exist when I go to run it. Howdy itself is working and the IR light turns on but the beam isn't blinking (it normally does when I use Windows Hello). Additionally because of the generator file being missing, it also breaks the systemd service (which also breaks the nixos-build switch process).

which also breaks the nixos-build switch process

While it does fail, the system has already switched to the new generation before that service failed.

it just says the "/usr/libexec/linux-enable-ir-emitter/driver-generator" doesn't exist when I go to run it.

Does not happen to me, but I also don't use the method I've described in that comment. I might've modified the modules/packages just a bit so it doesn't happen to me. Feel free to check out my dots.

Does not happen to me, but I also don't use the method I've described in that comment. I might've modified the modules/packages just a bit so it doesn't happen to me. Feel free to check out my dots.

Extremely odd.. your nixpkgs config matches up to exactly to what your dotfiles has (except for the linux-enable-ir-emitter package being a newer version in the nixpkgs module (the dotfiles has v4.5.0 while the nixpkgs module has v4.8.2).

Hey also, I did manage to get the package working on Archlinux using v5.0.2. It would be a good idea to also update to the very latest version  of linux-enable-ir-emitter, could possibly fix some of the issues im having getting the package to load.

I'm also working on updating howdy itself. The build process is now done through meson, which should make everything easier.

The IR package now works (mostly)! I can actually run the configure command, and it goes go through the process of configuring the driver. However when I tell it to save, it says "CRITICAL: Impossible to write driver in etc/linux-enable-ir-emitter/pci-0000:00:14.0-usb-0:6:1.2-video-index0-emitter0.driver: iostream error"

Ah, yeah. Looks like someone introduced a typo and forgot the / before etc/.... Will fix it soon.

Ok, I've updated Howdy as well. howdy-gtk now comes along with it, and it works quite well.
I've set linux-enable-ir-emitter to only work in /var/lib/linux-enable-ir-emitter, so no more writing to /etc.
Note that, with 5.0.2, I've had to run configure -m to get it to actually generate a driver for my laptop. Took like 50 n presses to get it right. Letting it auto-configure resulted might've worked if I let it run long enough, but it looked broken.

Cool, just got the update added and everything works good! 'Howdy-gtk' works too although it doesn't kill the process when I close the gui and does crash when I add a new model through the gui with a segmentation fault (at .howdy-gym-wrapped: line 3 it says precisely).
Also I'm thinking maybe having a desktop shortcut for the gtk app so it can be easily accessible for desktop environments.

Added the desktop entry and a few icons. Not sure about the segfault, haven't encountered it.

Hey I was just updating it and enabled that rubberstamp module and decided to use the hotkey setting but when I go to use it, Howdy complains that the hotkey module is missing the python module keyboard and it can be installed with pip. This needs to be included as a dependency for howdy to run properly (or else the system might get locked out like what almost happened to me 😓 )

I've noticed the segfault as well now. I don't know what causes it, but it's registering the model at least.

Howdy complains that the hotkey module is missing the python module keyboard

Added.

Also, I was trying to open the program from the desktop icon but it's not opening. In the journalctl, it says "the command could not be found"

I've hardcoded the path in the desktop file. You may have to check whether a PolKit authentication agent is running.

Hey, sadly with this latest commit, my laptop doesn't seem to be able to build opencv anymore. The kernel ends up running out of memory just before the build completes and kills the script before it can finish. Is there any possible way of giving an option to configure the build process of opencv or any other possible way of building the package without it crashing the system?

Is there any possible way of giving an option to configure the build process of opencv or any other possible way of building the package without it crashing the system?

Add (more) swap.
$ (umask 077; sudo fallocate -l 32G /var/swapfile)
$ sudo mkswap /var/swapfile
$ sudo swapon /var/swapfile

You can also set this up in configuration.nix, but for one-off stuff this should suffice.

Hey I think there should be some kind of warning when tweaking around with the kernel modules and when having howdy enabled! Notebly, I was trying to make OBS's Virtual Camera feature function and had accidentally included kernelModules = [ "v4l2loopback" ]; and this seems to completely break howdy. It makes Howdy not be able to read the camera path (however the recommended way from the Nix Wiki doesn't break it).

boot.kernelModules enables the listed modules directly, whereas boot.extraModulePackages only installs the modules, so that they're available to modprobe. In any case, I can add an assertion.

Hey, I think the PR is just about ready to get merged into nixpkgs! Other than the howdy-gtk still segmentation faulting when I add a new face, it lets me setup howdy at the very least in the gui. There's still the present issue with the desktop icon not pointing to the gtk app correctly. Other than those issues, both packages work thus far.

@NovaViper can you check whether the desktop item works now?

@NovaViper can you check whether the desktop item works now?

Was just getting ready to test it but the assertion for the kernel module seems to be bugged. I have the v4l2loopback package under boot.extraModulePackages but it still says that I'm using boot.kernelModules.

Can you check whether that's the case? You can launch a nix repl and do the following:
nix-repl> :lf path/to/your/config
nix-repl> nixosConfigurations.<HOSTNAME>.config.boot.kernelModules

Can you check whether that's the case? You can launch a nix repl and do the following:
nix-repl> :lf path/to/your/config
nix-repl> nixosConfigurations.<HOSTNAME>.config.boot.kernelModules

Here ya go
nix-repl> :lf /home/novaviper/Documents/NixConfig
Added 20 variables.
nix-repl> nixosConfigurations.yoganova.config.boot.kernelModules
[ "tcp_bbr" "kvm-intel" "bridge" "macvlan" "tap" "tun" "cpufreq_powersave" "loop" "atkbd" "ctr" "uinput" ]

Ok turns out I forgot to negate the predicate.

Running it without sudo should prompt the polkit authentication. I don't have one enabled currently so I can't test further.

Running it without sudo should prompt the polkit authentication. I don't have one enabled currently so I can't test further.

Yeah it prompts polkit but then it just doesn't open and says that permission error.

Hey @fufexan I think the package needs to be updated to have the latest changes for the PAM module. Because I notice since this commit (at least from what I can tell), it makes the computer no longer be able to properly restart (it oddly seems to make the machine sleep instead of restart).

@NovaViper pushed, hope it's working fine now.

@NovaViper pushed, hope it's working fine now.

Thank you! I updated the system and now I can restart.. but there's a couple of really strange issues I noticed reinstalling and booting up to the laptop this time:

These set of issues only seem to occur ONCE on the very first boot after a fresh installation

When I first boot uip and get to the lockscreen, I can't put the computer to sleep by closing the lid
I log in and still can't put the computer to sleep, so I send up pressing the suspend button on KDE
It does indeed suspend properly! So I go ahead and wake up the computer by pressing any keyboard button on the laptop.
I go ahead and restart it.. but this time it turns off everything like it's going to sleep again, but instead of sleeping it actually restarted! But here's the really odd thing, the power lights and keyboard lights are all off and slow pulsing like the machine is sleeping even though it's not; and I can't toggle on the keyboard lights (but input and everything still works).
I log into the computer and then tell it to go to sleep, and it actually sleeps, wake it back up and the lights finally turn back on

After restarting the machine for the second time, everything sleeps properly even before I unlock the system , but I notice these errors in the journalctl (I probably should've recorded the journal on the very first boot but I sadly I didn't think of it at the time).

Oct 25 14:28:04 yoganova sddm-helper[1879]: PAM unable to dlopen(/nix/store/1vaka0ilx6hr02f7iani3mz5y7m3jbin-howdy-unstable-2023-09-14/lib/security/pam_howdy.so}): /nix/store/1vaka0ilx6hr02f7iani3mz5y7m3jbin-howdy-unstable-2023-09-14/lib/security/pam_howdy.so}: cannot open shared object file: No such file or directory
Oct 25 14:28:04 yoganova sddm-helper[1879]: PAM adding faulty module: /nix/store/1vaka0ilx6hr02f7iani3mz5y7m3jbin-howdy-unstable-2023-09-14/lib/security/pam_howdy.so}
Oct 25 14:28:04 yoganova (systemd)[1882]: PAM unable to dlopen(/nix/store/1vaka0ilx6hr02f7iani3mz5y7m3jbin-howdy-unstable-2023-09-14/lib/security/pam_howdy.so}): /nix/store/1vaka0ilx6hr02f7iani3mz5y7m3jbin-howdy-unstable-2023-09-14/lib/security/pam_howdy.so}: cannot open shared object file: No such file or directory
Oct 25 14:28:04 yoganova (systemd)[1882]: PAM adding faulty module: /nix/store/1vaka0ilx6hr02f7iani3mz5y7m3jbin-howdy-unstable-2023-09-14/lib/security/pam_howdy.so}

Perhaps this could be causing all teh trouble this entire time? 🤔

I don't know how that slipped in, but I've fixed it. Gonna try and see whether it works now.

I don't know how that slipped in, but I've fixed it. Gonna try and see whether it works now.

Good deal! I'm also and reinstall Nix with the flake again to test the new changes, gonna take about a bit since it takes a while for the laptop to compile it all 👍🏾

Still doesn't work. Here's the error I'm getting:
Oct 26 21:05:06 io greetd[2530]: PAM unable to dlopen(/nix/store/1vaka0ilx6hr02f7iani3mz5y7m3jbin-howdy-unstable-2023-09-14/lib/security/pam_howdy.so): /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/gk9785yw44w60bpya3bj8il5lc971d2n-inih-57/lib/libINIReader.so.0)

Still doesn't work. Here's the error I'm getting:
Oct 26 21:05:06 io greetd[2530]: PAM unable to dlopen(/nix/store/1vaka0ilx6hr02f7iani3mz5y7m3jbin-howdy-unstable-2023-09-14/lib/security/pam_howdy.so): /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/gk9785yw44w60bpya3bj8il5lc971d2n-inih-57/lib/libINIReader.so.0)

EDIT: the problem is with my system most likely, as I'm still running glibc 2.37.

🤔 I may or may not run into that same issue on my system since my flake's using the more recent nixpkgs (the one from the 24th). Will let you know when I get the system installed

The commit from the 24th has glibc 2.38, so it should work. Currently rebuilding.

The commit from the 24th has glibc 2.38, so it should work. Currently rebuilding. EDIT: It works now.

Coming back to confirm! I can sleep the computer properly and those errors I had before are gone!

🤔 Hey I may have possibly figured out why gtk howdy is throwing segmentation faults. I noticed when I manually run the command it's saying that it's segmentation faulting at (env python3 "/nix/store/id-of-howdy/lib/howdy-gtk/init.py" "$@") and I found that it spits out an error saying "ModuleNotFoundError: No module named 'gi'". Maybe this could be the cause of the segmentation faults?

Deleted the original commit to better clarify, sorry to bother! I may have possibly figured out why howdy-gtk was throwing those segmentation faults that was found earlier. Was going through the what it line it was talking about, I noticed it was talking about the howdy-gtk-wrapped file that gets created as one of the resultant objects that got created during the build, which its contents are this
#!/nix/store/lf0wpjrj8yx4gsmw2s3xfl58ixmqk8qa-bash-5.2-p15/bin/sh

env python3 "/nix/store/1vaka0ilx6hr02f7iani3mz5y7m3jbin-howdy-unstable-2023-09-14/lib/howdy-gtk/init.py" "$@"

and this matches up to the howdy.in file on the package repo and init.py is like this. So my immediate thought is to go and run that command its linking to, which I did so and it immediately error-ed out saying it's missing a couple of modules (ModuleNotFoundError: No module named 'gi' and ModuleNotFoundError: No module named 'elevate' after I installed the package that contains the gi module). I did some digging and found out that these modules are under pygobject3 and elevate respectively. And this seems to at least make it not error about those missing modules but since I have run howdy-gtk as sudo, it doesn't pick up those packages. So pygobject3 and elevate need to be added into the nativeBuildInputs for howdy.
I have no idea if this will actually fix the segmentation fault but this is a start to at least be able to figure out what could possibly be causing it.
@fufexan

I did some digging and found out that these modules are under pygobject3 and elevate respectively. And this seems to at least make it not error about those missing modules but since I have run howdy-gtk as sudo, it doesn't pick up those packages. So pygobject3 and elevate need to be added into the nativeBuildInputs for howdy.

These are already in the py definition here, which we use in the wrapper. Adding them to nativeBuildInputs or even replacing the env python3 in the .howdy-gtk-wrapped file with "${py}/bin/python3" doesn't fix anything sadly.

And if that doesn't fix it, then I suggestion just putting that on the back burner and adding the core components of the package into upstream so at least the package can be used for the mean time. This could possibly require some help from the package's developer themselves 🤔

What core components?

Sorry for the late reply!

These are already in the py definition here, which we use in the wrapper. Adding them to nativeBuildInputs or even replacing the env python3 in the .howdy-gtk-wrapped file with "${py}/bin/python3" doesn't fix anything sadly.

Ah.. then I'm unsure then 🤷🏾♀

What core components?

Everything except the desktop file I was meaning.

Everything except the desktop file I was meaning.

I still don't understand. Upstream (boltgolt/howdy) already has everything. Unless you mean upstream (nixos/nixpkgs) and trying to get this PR merged?

Everything except the desktop file I was meaning.

I still don't understand. Upstream (boltgolt/howdy) already has everything. Unless you mean upstream (nixos/nixpkgs) and trying to get this PR merged?

My bad, yeah I mean like upstream it to nixpkgs

In that case, I think most things are working fine currently. I'll mark the PR as ready for review and ask for some.

Hello! https://github.com/NixOS/nixpkgs/issues/76928#issuecomment-1578237227

Hello! I had some trouble figuring out how to set this up to test it out so I wanted to share what I did to get it working.
I was able to follow this comment by fufexan for the most part, but the path to howdy.nix has since changed since it became a folder instead of a file. The code in configuration.nix to get it set up is now as follows:
config.nix:
{ inputs, pkgs, ... }: {
  disabledModules = ["security/pam.nix"];
  imports = [
    "${inputs.nixpkgs-howdy}/nixos/modules/security/pam.nix"
    "${inputs.nixpkgs-howdy}/nixos/modules/services/security/howdy"
    "${inputs.nixpkgs-howdy}/nixos/modules/services/misc/linux-enable-ir-emitter.nix"
  ];

  services = {
    howdy = {
      enable = true;
      package = inputs.nixpkgs-howdy.legacyPackages.${pkgs.system}.howdy;
      settings = {
        video.device_path = "/dev/video2";
        # you may not need these
        core.no_confirmation = true;
        video.dark_threshold = 90;
      };
    };

    # in case your IR blaster does not blink, run `sudo linux-enable-ir-emitter configure`
    linux-enable-ir-emitter = {
      enable = true;
      package = inputs.nixpkgs-howdy.legacyPackages.${pkgs.system}.linux-enable-ir-emitter;
    };
  };
}

flake.nix input:
inputs = {
  # ...
    nixpkgs-howdy.url = "github:fufexan/nixpkgs/howdy";

  };

It works as expected, which is great!
However, I was wondering if you had any insight into how to potentially disable Howdy for GDM login only so that the keyring gets unlocked normally. Otherwise, upon reaching Gnome, I manually have to type in my password to unlock my keyring, and I also get a second ssh password prompt.
I'm pretty sure I edited the PAM configuration on Ubuntu in some way to prevent it from being run at login, but I'm not sure of the NixOS way to do it. Any advice would be greatly appreciated, thank you!

I am having trouble upgrading and I suspect it's got something to do with howdy - does anyone here have any ideas?
❯ sudo nix flake update && sudo nixos-rebuild --flake .#TuxedoInfinityBook14Gen8 switch --show-trace
warning: updating lock file '/etc/nixos/flake.lock':
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/9b19f5e77dd906cb52dade0b7bd280339d2a1f3d' (2024-01-13)
  → 'github:NixOS/nixpkgs/c3e128f3c0ecc1fb04aef9f72b3dcc2f6cecf370' (2024-01-15)
building the system configuration...
error: builder for '/nix/store/74wxh6h1a2chpabd5m304lxrl8jz97c3-python3.11-dlib-19.24.2.drv' failed with exit code 139;
       last 10 log lines:
       >   File "/nix/store/7fnhc3nd125lq9vzw6bghsvbnmcc8mc1-python3.11-setuptools-69.0.2/lib/python3.11/site-packages/setuptools/command/test.py", line 223 in run
       >   File "/nix/store/7fnhc3nd125lq9vzw6bghsvbnmcc8mc1-python3.11-setuptools-69.0.2/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988 in run_command
       >   File "/nix/store/7fnhc3nd125lq9vzw6bghsvbnmcc8mc1-python3.11-setuptools-69.0.2/lib/python3.11/site-packages/setuptools/dist.py", line 963 in run_command
       >   File "/nix/store/7fnhc3nd125lq9vzw6bghsvbnmcc8mc1-python3.11-setuptools-69.0.2/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969 in run_commands
       >   File "/nix/store/7fnhc3nd125lq9vzw6bghsvbnmcc8mc1-python3.11-setuptools-69.0.2/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201 in run_commands
       >   File "/nix/store/7fnhc3nd125lq9vzw6bghsvbnmcc8mc1-python3.11-setuptools-69.0.2/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185 in setup
       >   File "/nix/store/7fnhc3nd125lq9vzw6bghsvbnmcc8mc1-python3.11-setuptools-69.0.2/lib/python3.11/site-packages/setuptools/__init__.py", line 103 in setup
       >   File "setup.py", line 208 in <module>
       >   File "/build/source/nix_run_setup", line 8 in <module>
       > /nix/store/v5irq7wvkr7kih0hhnch5nnv2dcq8c4f-stdenv-linux/setup: line 1557:  2777 Segmentation fault      (core dumped) /nix/store/asiphbpiy2gmidfm3xbwcikayhs66289-python3-3.11.7/bin/python3.11 nix_run_setup test --no USE_AVX_INSTRUCTIONS
       For full logs, run 'nix log /nix/store/74wxh6h1a2chpabd5m304lxrl8jz97c3-python3.11-dlib-19.24.2.drv'.
error: 1 dependencies of derivation '/nix/store/xp4kn5kryk1kkw2avn3q1nqwjmqraccf-python3-3.11.7-env.drv' failed to build
error: 1 dependencies of derivation '/nix/store/n65gbhkym84qw91mzzjq5dwd9phw54qz-howdy-unstable-2023-09-14.drv' failed to build
error: 1 dependencies of derivation '/nix/store/mjg2al5fzmx9z9angw8hfd79lpj92raq-chfn.pam.drv' failed to build
error: 1 dependencies of derivation '/nix/store/yhvxfa791pgx63033wg92lcasw29qcd5-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/j9zlg14qikwss5n5rmy93db6ay058447-nixos-system-Simon-s-Tuxedo-InfinityBook-14-Gen8-23.11.20240115.b8dd8be.drv' failed to build

I saw it's failing, I don't know what to do now tbh. Can't really rollback since I force-pushed :( And I also don't know which commit broke dlib.

I still have a working version running locally. Would it somehow be possible to extract the current state of the repo from my computer that you could restore the working commit with?

@fufexan Does it help any that I have the flake.lock that contains the old build of the module? I can quickly grab the sha256 and rev data that's for it!

@fufexan Does it help any that I have the flake.lock that contains the old build of the module? I can quickly grab the sha256 and rev data that's for it!

So do I actually!

@NovaViper it's alright, I found the old parent commit of this PR. Looks like it's https://github.com/fufexan/nixpkgs/commit/2e875f01cab7b276408c2a4dd2df0423bf691765. I'll revert it in a minute.

I hope it's back to the old state now, somewhat. I'll try to find a good in-between commit that works with the newer krb5 change, or I'll temporarily integrate a commit myself.

dlib will be fixed soon, we just have to wait for a PR to get merged. See more about it here https://github.com/NixOS/nixpkgs/issues/277004.
I don't think it's gonna be long, so I won't rebase for now.

@fufexan Hey the pam.nix file needs to be updated! There was a change made to it regarding krb5 and it completely breaks my flake when I update the flake to nixpkgs 842d9d80c.
┏━ 1 Errors:
 ⋮
┃        … while evaluating the attribute 'value'
┃
┃          at /nix/store/wcidiyklj0nrljlz5m3qlkvhv8f2ddv8-source/lib/modules.nix:809:9:
┃
┃           808|     in warnDeprecation opt //
┃           809|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
┃              |         ^
┃           810|         inherit (res.defsFinal') highestPrio;
┃
┃        (stack trace truncated; use '--show-trace' to show the full trace)
┃
┃        error: attribute 'enable' missing
┃
┃        at /nix/store/lswcnidnfwyy3ikfdvn2k33zdjjvyl2r-source/nixos/modules/security/pam.nix:1076:19:
┃
┃          1075|       enable = mkOption {
┃          1076|         default = config.krb5.enable;
┃              |                   ^
┃          1077|         defaultText = literalExpression "config.krb5.enable";

This particular line here: https://github.com/fufexan/nixpkgs/blob/6c4d8308df71d57f5a56f3037867355a3858be33/nixos/modules/security/pam.nix#L1076

I know, it's just way later in the history than the dlib breakage. I'd have to manually include the commit (and possibly others as well) for it to work.

@NovaViper @SimonBrandner updated. I've included the commits from https://github.com/NixOS/nixpkgs/pull/279927 temporarily, and will remove them once it's merged.

Hmm, with the newest version, I seem to get stuck when unlocking - it never fails nor succeeds. Can anyone reproduce this?

@SimonBrandner I'm currently trying to rebuild howdy atm, it's taking a while because of how large opencv is (and due to my laptop only having 8GB of ram 😢 ), will test for this whenever the compile finishes

@SimonBrandner I've also noticed that, and I think it's an issue with OpenCV. Tried running sudo -E howdy test and it should show a live feed of the camera, but it doesn't. I have to kill python from another terminal window.

@SimonBrandner @fufexan Can confirm I have the same issue aswell after updating!

@fufexan Hey #279927 just merged! Should be able to now build against that

🤔 It looks like that bug where the process never stops has gone away since updating my flake to today's changes

I just did nix flake update and nixos-rebuild but the issue persists

Welp, I tested it again after restarting my laptop and the issue came back and completely locks up logging into KDE 👀

@NovaViper no, I don't see any new comments on the files. Maybe you forgot to press Review Changes?
Anyway I was just looking at the files and will try to update both Howdy and linux-enable-ir-emitter in a few hours.

@NovaViper no, I don't see any new comments on the files. Maybe you forgot to press Review Changes?

Ah! That's what it was! I think you should be able to see it now.

Anyway I was just looking at the Howdy commit history and will try to update both Howdy and linux-enable-ir-emitter in a few hours.
👍🏾

Hey the pam.nix file needs to be updated again! Some changes to it from upstream made it break and impossible to compile with howdy enabled!
error:
       … while calling the 'head' builtin

         at /nix/store/599wy5snf00pn1apmsnzmiy0ysdpds03-source/lib/attrsets.nix:960:11:

          959|         || pred here (elemAt values 1) (head values) then
          960|           head values
             |           ^
          961|         else

       … while evaluating the attribute 'value'

         at /nix/store/599wy5snf00pn1apmsnzmiy0ysdpds03-source/lib/modules.nix:809:9:

          808|     in warnDeprecation opt //
          809|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          810|         inherit (res.defsFinal') highestPrio;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attribute 'usb' missing

       at /nix/store/7nzq5l42kgn77hf4li8gfpz4qb9p18dl-source/nixos/modules/security/pam.nix:209:19:

          208|       usbAuth = mkOption {
          209|         default = config.security.pam.usb.enable;
             |                   ^
          210|         defaultText = literalExpression "config.security.pam.usb.enable";
       Did you mean one of u2f or ussh?
┏━ 1 Errors:
 ⋮
┃        … while evaluating the attribute 'value'
┃
┃          at /nix/store/599wy5snf00pn1apmsnzmiy0ysdpds03-source/lib/modules.nix:809:9:
┃
┃           808|     in warnDeprecation opt //
┃           809|       { value = builtins.addErrorContext "while evaluating the option `${showOption …
┃              |         ^
┃           810|         inherit (res.defsFinal') highestPrio;
┃
┃        (stack trace truncated; use '--show-trace' to show the full trace)
┃
┃        error: attribute 'usb' missing
┃
┃        at /nix/store/7nzq5l42kgn77hf4li8gfpz4qb9p18dl-source/nixos/modules/security/pam.nix:209:19:
┃
┃           208|       usbAuth = mkOption {
┃           209|         default = config.security.pam.usb.enable;
┃              |                   ^
┃           210|         defaultText = literalExpression "config.security.pam.usb.enable";
┃        Did you mean one of u2f or ussh?

@nu-nu-ko I believe I've addressed your points, let me know if there's anything else looking off.
@NovaViper updated, it should work again.

Updated and it works now! Thank you!

I am getting this when trying to update... do you have any suggestions?
error:
       … while calling the 'head' builtin

         at /nix/store/684dgr65n8li4pnfirls96jigyhvb9rq-source/lib/attrsets.nix:922:11:

          921|         || pred here (elemAt values 1) (head values) then
          922|           head values
             |           ^
          923|         else

       … while evaluating the attribute 'value'

         at /nix/store/684dgr65n8li4pnfirls96jigyhvb9rq-source/lib/modules.nix:807:9:

          806|     in warnDeprecation opt //
          807|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          808|         inherit (res.defsFinal') highestPrio;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attribute 'intune' missing

       at /nix/store/46qk653gj878vbxq6mvs3xfgghbxc8ki-source/nixos/modules/security/pam.nix:702:18:

          701|               || cfg.enableGnomeKeyring
          702|               || config.services.intune.enable
             |                  ^
          703|               || cfg.googleAuthenticator.enable

@SimonBrandner 😰.. I haven't had that issue, updated fine for me. Though I do notice that using the nix-community binary cache seemed to cause lots of breakage on my end (hash mismatches and the like), are you using that or no?

I attempted adding --option build-use-substitutes false but it still fails...

I am still experiencing the issue mentioned above... I am also failing to find any info about attribute 'intune'... Does anyone here have any guesses at what this could be?

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/i-am-getting-error-attribute-intune-missing-when-updating-a-flake/41595/1

I am still experiencing the issue mentioned above... I am also failing to find any info about attribute 'intune'... Does anyone here have any guesses at what this could be?

So I think I know what the issue is: This PR builds on unstable, and therefore somewhere refers to intune which is only available on unstable. Though I am running NixOS stable, so my system gets confused by the intune config thingy as it isn't aware of its existence...
Do you happen to have any ideas on how to work around this?

Speaking of which.. the PR needs to be updated again, can't build it because the PAM module completely changed with the release of KDE Plasma 6, ended up having to stop using it for a good couple of weeks now because of the rapid changes

I managed to get it working using this hack though I am again getting the issue where howdy sometimes gets stuck unlocking. It also doesn't work from the SDDM and the Plasma lock screen

I can't say the current state of howdy gives me much hope. I stopped using it. At this point it's more work trying to face-auth than to type my password.
I'll try to rebase.

🤔 Hey @fufexan I did just notice this on the Howdy wiki page. I wonder if this could possibly fix it?
I can't try it out atm since the PR's pam module isn't updated to the latest version. Since we did find that it breaks almost immediately after suspending and waking up the computer; could try changing that setting the troubleshooting guide says and see if that fixes it. If it doesn't, then I could go and make an issue about it on the Howdy git repo and hopefully find what could be possibly the issue.

@NovaViper I've also set abort_if_lid_closed = false; and suspended/resumed my laptop, and I've had no issues yet. This might just be the fix. Thanks for looking into it!
I'll update here in case I run into problems.

Hey, I've ran sudo howdy add -U h3ndrik
And now it's sitting there using 100% of one CPU core since 30mins. Is that normal behaviour? The IR emitter briefly turned on and it took a picture. (Also sudo howdy test and sudo howdy snapshotwere fine.)
No face model folder found, creating one
Adding face model for the user h3ndrik
Enter a label for this new model [Model #0]:

Please look straight into the camera

@NovaViper I've also set abort_if_lid_closed = false; and suspended/resumed my laptop, and I've had no issues yet. This might just be the fix. Thanks for looking into it!
I'll update here in case I run into problems.
EDIT: left my laptop suspended overnight. When I resumed it, I was back to the same old problem.

Hey I actually started running into the issue aswell recently. I'm unsure what could be causing it at this point now 😓

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/howdy-windows-hello-replacement/43894/3

Rebased thinking the infinite loop issue might be fixed. It isn't yet.

Welp, I tested it again after restarting my laptop and the issue came back and completely locks up logging into KDE 👀
Quick edit again: It feels very intermittent.. after forcibly killing the process and trying to run sudo, it seems to work and properly time out (for when I cover the camera's len).. but if I try to authenticate with my face it gets stuck again. It seems like once it sees your face it just completely breaks at any point; but if you cover the camera it will time itself out
Second edit: Also a big thing I notice is when I run sudo howdy test, the process just completely lock up if it sees my face at any point. Killing .howdy-wrapped and all python3 instances will make the entire process die and free up the camera again. It looks like there's a python process that gets left behind and it'll just continuously run forever.. really unsure what's causing it

Is this still an issue? It could be related to OpenBLAS and OpenCV conflicting. See https://github.com/NixOS/nixpkgs/issues/277004#issuecomment-2089402825.

Welp, I tested it again after restarting my laptop and the issue came back and completely locks up logging into KDE 👀

Quick edit again: It feels very intermittent.. after forcibly killing the process and trying to run sudo, it seems to work and properly time out (for when I cover the camera's len).. but if I try to authenticate with my face it gets stuck again. It seems like once it sees your face it just completely breaks at any point; but if you cover the camera it will time itself out

Second edit: Also a big thing I notice is when I run sudo howdy test, the process just completely lock up if it sees my face at any point. Killing .howdy-wrapped and all python3 instances will make the entire process die and free up the camera again. It looks like there's a python process that gets left behind and it'll just continuously run forever.. really unsure what's causing it

Is this still an issue? It could be related to OpenBLAS and OpenCV conflicting. See https://github.com/NixOS/nixpkgs/issues/277004#issuecomment-2089402825.

Yeah it's still an issue, maybe your finding could help the entire issue along! Especially since I have seen antinn mg e else having the issue in upstream

@hacker1024 I've tried adding an overlay as per your comment in the dlib issue, but it does not seem to solve the issue. Here's what I've added in my config:
{self, ...}: {
  nixpkgs = {
    config.allowUnfree = true;

    overlays = [
      # fix Howdy
      (final: prev: {
        dlib = prev.dlib.override {
          blas = prev.blas.override {
            openblas = prev.openblas.override {singleThreaded = true;};
          };
        };
      })
    ];
  };
}

Do you have the exact overlay that overrides pythonPackages?

@hacker1024 I've tried adding an overlay as per your comment in the dlib issue, but it does not seem to solve the issue. Here's what I've added in my config:
{self, ...}: {
  nixpkgs = {
    config.allowUnfree = true;

    overlays = [
      # fix Howdy
      (final: prev: {
        dlib = prev.dlib.override {
          blas = prev.blas.override {
            openblas = prev.openblas.override {singleThreaded = true;};
          };
        };
      })
    ];
  };
}

Do you have the exact overlay that overrides pythonPackages?

I wouldn't recommend overriding dlib entirely, as the issue is only related to the Python package. That overlay should still work, though, so it's possible that the issue I discovered is not the cause of this one.

I still have a working build of howdy from an old system generation. I'm not sure if any useful information can be gleaned from what's in the nix store for it but I'd be happy to share any relevant information. Now that I've upgraded to 24.05 and the flake along with it, I can confirm that I'm also experiencing the freezing issue; I've disabled it for now.

What's the situation here ? I just added howdy from the fork to my config. It seems to work fine for me for the moment.

@louis-thevenet usually it works fine when you enable it, but after a suspend/resume cycle it just hangs. If it doesn't for you I can take a look at rebasing the PR.

@louis-thevenet usually it works fine when you enable it, but after a suspend/resume cycle it just hangs. If it doesn't for you I can take a look at rebasing the PR.

It does keep working for me. I wonder what's the cause of your problem.
I would appreciate that, thanks. =)

It does keep working for me. I only had this issue once, I wonder why it's happening.
I would appreciate that, thanks. =)

Question.. did you by any chance update opencv? It did receive an update recently. Wondering if that may have fixed the bug 🤔

Question.. did you by any chance update opencv? It did receive an update recently. Wondering if that may have fixed the bug 🤔

No, I have opencv 4.9.0 (from nixpkgs) and I think you're referring to 4.10.0
I actually had the issue a second time when I went to see the opencv version on my laptop... :s
For now, I'd say I had it like 10% of the times I suspended my laptop, not ideal but usable.
Once it happened, every time howdy is ran the bug occurs until the next reboot. As if it was stuck in a special state. And since the program is not running in between calls, maybe some data files from howdy are being corrupted ? Or maybe it's a "the camera is already in use" bug or something.
I'm waiting for the bug to appear to investigate more.

I've updated howdy and linux-enable-ir-emitter, hopefully no module changes are needed for the latter. Will test soon.

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.

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:
<EMAIL_ADDRESS>= false;
<EMAIL_ADDRESS>= 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.

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!

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:

(Assuming your flake is in ~/flake and you are currently in ~)
Have a local Nixpkgs clone: gh repo clone NixOS/nixpkgs
Make sure it's up-to-date: git fetch --all
Checkout this PR: gh pr checkout 216245
Rebase the commits of this PR onto your desired branch: git rebase --onto 4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0 HEAD~4

4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0 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 4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0 with your desired revision of Nixpkgs.

Finally, go into your NixOS flake (cd ~/flake) and temporarily override Nixpkgs: nix flake lock --override-input nixpkgs ~/nixpkgs
Configure the module in your system
Rebuild and Switch!

https://github.com/NixOS/nixpkgs/issues/76928#issuecomment-1578237227 here's a simpler approach.

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

@PaideiaDilemma should be fixed now.
Can anyone test?

@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: https://github.com/boltgolt/howdy/issues/969)

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

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

@fufexan Sounds reasonable.

In the meantime we can separately add the patch.

Yeah, why not.

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

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

Tried it yesterday, still have the same behavior