From 75a8614ae8ad9fb97a14a9c78a3f9939fb265eb5 Mon Sep 17 00:00:00 2001 From: Colin Date: Sat, 28 Sep 2024 11:47:18 +0000 Subject: [PATCH] sanebox: remove symlink-cache i don't use sanebox anymore, and the cache was awful while it did exist, so just delete that --- hosts/common/programs/sanebox.nix | 50 +------------------------------ 1 file changed, 1 insertion(+), 49 deletions(-) diff --git a/hosts/common/programs/sanebox.nix b/hosts/common/programs/sanebox.nix index 79ad61cd6..ef332103f 100644 --- a/hosts/common/programs/sanebox.nix +++ b/hosts/common/programs/sanebox.nix @@ -1,18 +1,6 @@ -{ config, lib, pkgs, sane-lib, ... }: +{ config, lib, pkgs, ... }: let 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 { sane.programs.sanebox = { @@ -41,40 +29,4 @@ in }; 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: - 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: - package = pkgs.buildEnv { - name = "opengl-drivers-32bit"; - paths = [ gl.package32 ] ++ gl.extraPackages32; - }; - in "${package}"; - } // fsSymlinksAsAttrs) - ); - }; }