diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-03-26 02:06:11 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-03-26 02:06:11 +0900 |
| commit | 371dd5b938e70fa077d1452456fdd203b7a61cb9 (patch) | |
| tree | f880594d068324988a468459b0ede9128e151d15 /nixos.nix | |
| parent | 4836d570aed76ad607b964e55264e8397627fbf3 (diff) | |
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 <cat@gensokyo.uk>
Diffstat (limited to 'nixos.nix')
| -rw-r--r-- | nixos.nix | 24 |
1 files changed, 15 insertions, 9 deletions
@@ -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; |
