Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nh clean user panicked #196

Open
arunoruto opened this issue Dec 16, 2024 · 1 comment
Open

nh clean user panicked #196

arunoruto opened this issue Dec 16, 2024 · 1 comment

Comments

@arunoruto
Copy link

I installed my home-manager config on a fresh Ubuntu 24.04 instance and had some initial trouble with a few things. Among those is nh since I use it to clean things up occasionally on non-NixOS systems. When I am running nh clean user I get the following message:

❯ RUST_LOG=debug nh clean user
DEBUG nh:23: args=NHParser { verbose: false, command: Clean(CleanProxy { command: User(CleanArgs { keep: 1, keep_since: Duration(0ns), dry: false, ask: false, nogc: false, nogcroots: false }) }) }
DEBUG nh:24: NH_VERSION=3.6.0
The application panicked (crashed).
Message:  called `Option::unwrap()` on a `None` value
Location: src/clean.rs:73

Have I installed nh incorrectly, and it can't recognize my user?
An additional note: I am using an LDAP user, but I have the same user on a different machine, and everything works fine there, albeit that machine is running 22.04.

@viperML
Copy link
Owner

viperML commented Dec 16, 2024

This is is the line that crashes but I have no idea why:

let user = nix::unistd::User::from_uid(uid)?.unwrap();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants