Skip to content

Commit

Permalink
Only scan users 1000-1100
Browse files Browse the repository at this point in the history
Closes #62
  • Loading branch information
viperML committed Jan 14, 2024
1 parent dcaf5bb commit 36eba28
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "nh"
version = "3.5.1"
version = "3.5.2"
edition = "2021"
license = "EUPL-1.2"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
3 changes: 2 additions & 1 deletion src/clean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ impl NHRunnable for interface::CleanMode {
let path = read_dir?.path();
profiles.extend(profiles_in_dir(path));
}
debug!("Scanning XDG profiles for users 0, 1000-1100");
for user in unsafe { uzers::all_users() } {
if user.uid() >= 1000 || user.uid() == 0 {
if user.uid() >= 1000 && user.uid() < 1100 || user.uid() == 0 {
debug!(?user, "Adding XDG profiles for user");
profiles.extend(profiles_in_dir(
user.home_dir().join(".local/state/nix/profiles"),
Expand Down

0 comments on commit 36eba28

Please sign in to comment.