aboutsummaryrefslogtreecommitdiffhomepage
path: root/nixos.nix
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-03-26 02:06:11 +0900
committerOphestra <cat@gensokyo.uk>2025-03-26 02:06:11 +0900
commit371dd5b938e70fa077d1452456fdd203b7a61cb9 (patch)
treef880594d068324988a468459b0ede9128e151d15 /nixos.nix
parent4836d570aed76ad607b964e55264e8397627fbf3 (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.nix24
1 files changed, 15 insertions, 9 deletions
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;