Skip to content

Commit

Permalink
nixos/opengl: use systemd.tmpfiles.settings
Browse files Browse the repository at this point in the history
I want to use the final symlinked package in system.checks and need to
access that somehow. Instead of adding a new option, we might as well
convert tmpfiles to the new structure.
  • Loading branch information
SuperSandro2000 committed Jun 5, 2024
1 parent 0898fee commit 576e94f
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions nixos/modules/hardware/opengl.nix
Original file line number Diff line number Diff line change
Expand Up @@ -136,17 +136,16 @@ in
}
];

systemd.tmpfiles.rules = [
"L+ /run/opengl-driver - - - - ${package}"
(
systemd.tmpfiles.settings.opengl = {
"/run/opengl-driver"."L+".argument = toString package;
"/run/opengl-drive-32" =
if pkgs.stdenv.isi686 then
"L+ /run/opengl-driver-32 - - - - opengl-driver"
{ "L+".argument = "opengl-driver"; }
else if cfg.driSupport32Bit then
"L+ /run/opengl-driver-32 - - - - ${package32}"
{ "L+".argument = toString package32; }
else
"r /run/opengl-driver-32"
)
];
{ "r" = {}; };
};

environment.sessionVariables.LD_LIBRARY_PATH = lib.mkIf cfg.setLdLibraryPath
([ "/run/opengl-driver/lib" ] ++ lib.optional cfg.driSupport32Bit "/run/opengl-driver-32/lib");
Expand Down

0 comments on commit 576e94f

Please sign in to comment.