sanebox: remove symlink-cache
i don't use sanebox anymore, and the cache was awful while it did exist, so just delete that
This commit is contained in:
@@ -1,18 +1,6 @@
|
|||||||
{ config, lib, pkgs, sane-lib, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.sane.programs;
|
cfg = config.sane.programs;
|
||||||
# create an AttrSet[String -> String]
|
|
||||||
# which maps symlink path -> symlink content
|
|
||||||
# for every symlink known to nix
|
|
||||||
fsSymlinksAsAttrs = lib.concatMapAttrs
|
|
||||||
(path: value: lib.optionalAttrs
|
|
||||||
((value.symlink or null) != null)
|
|
||||||
{
|
|
||||||
"${path}" = value.symlink.target;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
config.sane.fs
|
|
||||||
;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
sane.programs.sanebox = {
|
sane.programs.sanebox = {
|
||||||
@@ -41,40 +29,4 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
environment.pathsToLink = lib.mkIf cfg.sanebox.enabled [ "/libexec/sanebox" ];
|
environment.pathsToLink = lib.mkIf cfg.sanebox.enabled [ "/libexec/sanebox" ];
|
||||||
|
|
||||||
environment.etc = lib.mkIf cfg.sanebox.enabled {
|
|
||||||
"sanebox/symlink-cache".text = lib.concatStringsSep "\n" (
|
|
||||||
lib.mapAttrsToList
|
|
||||||
(k: v: "${k}\t${v}")
|
|
||||||
({
|
|
||||||
"/bin/sh" = config.environment.binsh;
|
|
||||||
"${builtins.unsafeDiscardStringContext config.environment.binsh}" = "bash";
|
|
||||||
"/usr/bin/env" = config.environment.usrbinenv;
|
|
||||||
"${builtins.unsafeDiscardStringContext config.environment.usrbinenv}" = "coreutils";
|
|
||||||
|
|
||||||
# "/run/current-system" = "${config.system.build.toplevel}";
|
|
||||||
# XXX: /run/current-system symlink can't be cached without forcing regular mass rebuilds:
|
|
||||||
# mount it as if it were a directory instead.
|
|
||||||
"/run/current-system" = "";
|
|
||||||
} // lib.optionalAttrs config.hardware.graphics.enable {
|
|
||||||
"/run/opengl-driver" = let
|
|
||||||
gl = config.hardware.graphics;
|
|
||||||
# from: <repo:nixos/nixpkgs:nixos/modules/hardware/graphics.nix>
|
|
||||||
package = pkgs.buildEnv {
|
|
||||||
name = "opengl-drivers";
|
|
||||||
paths = [ gl.package ] ++ gl.extraPackages;
|
|
||||||
};
|
|
||||||
in "${package}";
|
|
||||||
} // lib.optionalAttrs (config.hardware.graphics.enable && config.hardware.graphics.enable32Bit) {
|
|
||||||
"/run/opengl-driver-32" = let
|
|
||||||
gl = config.hardware.graphics;
|
|
||||||
# from: <repo:nixos/nixpkgs:nixos/modules/hardware/graphics.nix>
|
|
||||||
package = pkgs.buildEnv {
|
|
||||||
name = "opengl-drivers-32bit";
|
|
||||||
paths = [ gl.package32 ] ++ gl.extraPackages32;
|
|
||||||
};
|
|
||||||
in "${package}";
|
|
||||||
} // fsSymlinksAsAttrs)
|
|
||||||
);
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user