chore(features): drop orphan userPackages reader
`features/default.nix` had a let-block that read `~/.config/home-manager/user-packages.json` at eval time via `builtins.pathExists` + `builtins.readFile`, parsed it as JSON, and filtered to valid pkgs — then never appended the result to `home.packages` or anywhere else. The `userPackages` variable was completely orphan. Two problems with the dead code: (1) it was an undocumented hidden mechanism (no docs mentioned `user-packages.json`), (2) it made flake evaluation impurely depend on a user's home directory for no payoff — flake outputs would silently differ between machines depending on the presence of that file, even though nothing in the build used it. Removed the let-block entirely. The nomarchyLib import stays. Found during Pillar 8 audit of features/apps.
This commit is contained in:
@@ -2,14 +2,6 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
nomarchyLib = import ../lib { inherit lib; };
|
nomarchyLib = import ../lib { inherit lib; };
|
||||||
userPackagesFile = "${config.home.homeDirectory}/.config/home-manager/user-packages.json";
|
|
||||||
userPackages = if builtins.pathExists userPackagesFile then
|
|
||||||
let
|
|
||||||
pkgNames = builtins.fromJSON (builtins.readFile userPackagesFile);
|
|
||||||
# Filter to only packages that exist in pkgs to prevent build failures
|
|
||||||
validPkgs = builtins.filter (name: builtins.hasAttr name pkgs) pkgNames;
|
|
||||||
in builtins.map (name: pkgs.${name}) validPkgs
|
|
||||||
else [];
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
|||||||
Reference in New Issue
Block a user