Skip to content

Commit 94a5228

Browse files
xoltiaCarterLi
authored andcommitted
Packages (Linux): add /etc/profiles/per-user detection for nix user packages
1 parent 382c0cd commit 94a5228

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/detection/packages/packages_linux.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,10 @@ void ffDetectPackagesImpl(FFPackagesResult* result, FFPackagesOptions* options)
673673
ffStrbufSet(&profilePath, &stateDir);
674674
ffStrbufAppendS(&profilePath, "nix/profile");
675675
result->nixUser += getNixPackages(&stateDir, "nix/profile");
676+
677+
// check if /etc/profiles/per-user/$USER exists
678+
FF_STRBUF_AUTO_DESTROY userPkgsDir = ffStrbufCreateStatic("/etc/profiles/per-user/");
679+
result->nixUser += getNixPackages(&userPkgsDir, instance.state.platform.userName.chars);
676680
}
677681

678682
if (!(options->disabled & FF_PACKAGES_FLAG_GUIX_BIT))

0 commit comments

Comments
 (0)