modules/programs: remove dead code from per-user profiles

This commit is contained in:
Colin 2024-05-15 23:58:10 +00:00
parent b4229ecb1e
commit 1211023c55

View File

@ -2,8 +2,6 @@
let
saneCfg = config.sane;
cfg = config.sane.programs;
fs-lib = sane-lib.fs;
path-lib = sane-lib.path;
# create a map:
# {
@ -64,23 +62,6 @@ let
++ sandbox.extraPaths
;
additionalPathsForUser = user: let
fullHomePaths = builtins.map
(p: path-lib.concat [ user.home p ])
allowedHomePaths
;
fullRunPaths = builtins.map
(p: path-lib.concat [ "/run/user/${builtins.toString user.uid}" p ])
allowedRunPaths
;
in
fullHomePaths ++ fullRunPaths;
# expand user-specific paths for all users.
# this feeds into the symlink cache, so that cached link data can be available no matter which user invokes the program.
userPathsClosure = lib.flatten (
builtins.map additionalPathsForUser (builtins.attrValues config.users.users)
);
sandboxArgs = makeSandboxArgs {
inherit (sandbox)
autodetectCliPaths