nix: create current-system symlink
All checks were successful
Test / Create distribution (push) Successful in 20s
Release / Create release (push) Successful in 27s
Test / Fpkg (push) Successful in 35s
Test / Fortify (push) Successful in 40s
Test / Data race detector (push) Successful in 40s
Test / Flake checks (push) Successful in 58s

This is copied at runtime because it appears to be impossible to obtain this path in nix.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-03-26 02:06:11 +09:00
parent 4836d570ae
commit 371dd5b938
4 changed files with 21 additions and 18 deletions

View File

@@ -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;