From 371dd5b938e70fa077d1452456fdd203b7a61cb9 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 26 Mar 2025 02:06:11 +0900 Subject: nix: create current-system symlink This is copied at runtime because it appears to be impossible to obtain this path in nix. Signed-off-by: Ophestra --- nixos.nix | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'nixos.nix') diff --git a/nixos.nix b/nixos.nix index 7186cd70..8cb58721 100644 --- a/nixos.nix +++ b/nixos.nix @@ -128,7 +128,6 @@ in (mustBind "/bin") (mustBind "/usr/bin") (mustBind "/nix/store") - (mustBind "/run/current-system") (bind "/sys/block") (bind "/sys/bus") (bind "/sys/class") @@ -151,20 +150,27 @@ in auto_etc = true; cover = [ "/var/run/nscd" ]; - symlink = optionals (isGraphical && config.hardware.graphics.enable) ( + symlink = [ [ - config.systemd.tmpfiles.settings.graphics-driver."/run/opengl-driver"."L+".argument - "/run/opengl-driver" + "*/run/current-system" + "/run/current-system" ] ] - ++ optionals (app.multiarch && config.hardware.graphics.enable32Bit) [ + ++ optionals (isGraphical && config.hardware.graphics.enable) ( [ - config.systemd.tmpfiles.settings.graphics-driver."/run/opengl-driver-32"."L+".argument - /run/opengl-driver-32 + [ + config.systemd.tmpfiles.settings.graphics-driver."/run/opengl-driver"."L+".argument + "/run/opengl-driver" + ] ] - ] - ); + ++ optionals (app.multiarch && config.hardware.graphics.enable32Bit) [ + [ + config.systemd.tmpfiles.settings.graphics-driver."/run/opengl-driver-32"."L+".argument + /run/opengl-driver-32 + ] + ] + ); }; inherit enablements; -- cgit v1.3.1