Commit graph

34 commits

Author SHA1 Message Date
John Kehayias
28ee35c0b7
nonguix: multiarch-container: Expose /dev/ntsync.
Also, update my copyright lines from previous work.

* nonguix/multiarch-container.scm (make-container-wrapper): Expose /dev/ntsync.
2025-08-10 13:25:13 -04:00
John Kehayias
6c497a883d
nonguix: multiarch-container: Use writable file system.
This was a change in Guix to make read-only root file system the default in
containers.  See commit ce363c1dc7bd63a74dcf7788d340819f6d5db89f.

* nonguix/multiarch-container.scm (make-container-wrapper): Use option
"--writable-root".
2025-05-05 18:41:32 -04:00
Herman Rimm
d6fdc8ced4
multiarch-container: Support sandbox home relative to XDG_DATA_HOME.
* nonguix/multiarch-container.scm (make-container-wrapper): Set sandbox-home
relative to XDG_DATA_HOME environment variable, if it exists.

Signed-off-by: Hilton Chain <hako@ultrarare.space>
Modified-by: Hilton Chain <hako@ultrarare.space>
2025-04-18 15:11:45 +08:00
Hilton Chain
ee118a4e80
nonguix: multiarch-container: Fix controller detection.
Fixes: https://gitlab.com/nonguix/nonguix/-/issues/384

* nonguix/multiarch-container.scm (make-internal-script): Fix controller
detection.

Reported-by: Morgan Smith <Morgan.J.Smith@outlook.com>
2025-04-05 08:30:16 +08:00
Hilton Chain
8096527af7
nonguix: nonguix-container: Set more default values.
Since packages field of <nonguix-container> was never used (it's lowered to a
list of store paths, which doesn't suit packages->manifest's expectation), this
commit makes use of it to provide default value for various other fields:

packages -> union64 + union32 -> ld.so.conf -> ld.so.cache.

* nonguix/multiarch-container.scm (<nonguix-container>)[ld.so.conf,ld.so.cache]
[union64,union32]: Set default value.
(make-container-manifest): Remove ngc-packages reference.
2025-04-05 07:57:49 +08:00
John Kehayias
0d9c22d1c4
multiarch-container: make-internal-script: Add nss to LD_LIBRARY_PATH.
* nonguix/multiarch-container.scm (make-internal-script): Add nss to
LD_LIBRARY_PATH (as nss puts libraries in lib/nss).
2025-02-16 18:39:57 -05:00
John Kehayias
3195ddf9f1
nonguix: multiarch-container: Handle empty shares env variable.
Launching a package, like steam, with GUIX_SANDBOX_EXTRA_SHARES= (set to an
empty string) will cause guix shell to fail to launch with "guix shell: error:
statfs: : No such file or directory".

* nonguix/multiarch-container.scm (make-container-wrapper): Check that the
environment variable GUIX_SANDBOX_EXTRA_SHARES is both set and not an empty
string.

Reported-by: apoorv569
2025-01-08 17:57:05 -05:00
John Kehayias
c075e3ae21
nonguix: multiarch-container: Don't try to start pulseaudio.
Closes #241.

See discussion in above issue, but the summary is that the container (or any
package/program) shouldn't be trying to start pulseaudio (or other home/system
services, especially that can be started on demand).  While previously this
was done to avoid some issue, it is not clear if that is still the case and it
may possibly lead to other issues.  So, let's default to a more
expected (non-) behavior.

* nonguix/multiarch-container.scm (make-container-wrapper): Remove invoke of
pulseaudio.
2025-01-04 19:53:01 -05:00
Hilton Chain
5c33acaaa5
nonguix: multiarch-container: Link fonts to /usr/share/fonts.
* nonguix/multiarch-container.scm (make-internal-script): Link fonts to
/usr/share/fonts.

Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
2024-03-22 21:14:25 -04:00
Hilton Chain
cd07617047
nonguix: multiarch-container: Expose /etc/os-release.
* nonguix/multiarch-container.scm (make-container-wrapper): Expose
/etc/os-release.

Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
2024-03-22 21:14:23 -04:00
Hilton Chain
556057f333
nonguix: multiarch-container: Preserve TZ and TZDIR.
* nonguix/multiarch-container.scm (make-container-wrapper): Preserve TZ and TZDIR.

Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
Co-authored-by: John Kehayias <john.kehayias@protonmail.com>
2024-03-22 21:14:18 -04:00
Hilton Chain
e54439a302
multiarch-container: make-internal-script: Add VDPAU paths to LD_LIBRARY_PATH.
* nonguix/multiarch-container.scm (make-container-wrapper): Don't set
VDPAU_DRIVER_PATH.
(make-internal-script): Add VDPAU paths to LD_LIBRARY_PATH.

Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
2024-03-22 21:08:42 -04:00
Hilton Chain
2d8de496b1
multiarch-container: make-container-wrapper: Set LIBVA_DRIVERS_PATH.
* nonguix/multiarch-container.scm (make-container-wrapper): Set
LIBVA_DRIVERS_PATH and preserve it.

Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
2024-03-22 21:08:41 -04:00
Hilton Chain
09151acd73
nonguix: multiarch-container: Share Wayland environment.
* nonguix/multiarch-container.scm (make-container-wrapper): Preserve environment
variables and share socket for Wayland.

Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
2024-03-22 21:08:39 -04:00
Hilton Chain
8c08d0bbe5
nonguix: multiarch-container: Symlink EGL configurations.
* nonguix/multiarch-container.scm (make-internal-script): Symlink EGL
configurations.

Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
2024-03-22 21:08:38 -04:00
Hilton Chain
1c419ee1a8
nonguix: multiarch-container: Symlink all available Vulkan layers.
* nonguix/multiarch-container.scm (make-internal-script): Symlink all
available Vulkan layers.

Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
2024-03-22 21:08:36 -04:00
Hilton Chain
3cebd9c77b
multiarch-container: make-internal-script: Improve icd-symlink.
* nonguix/multiarch-container.scm (make-internal-script)[icd-symlink]: Allow
custom directory.
Rename to…
[file-symlink]: …this.
[get-files]: New procedure to simplify find-files use.

Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
2024-03-22 21:08:35 -04:00
Michal Atlas
729ee6b62a
nongnu: multiarch-container: Fix preserved-env not being used.
* nonguix/multiarch-container.scm (make-container-wrapper): Use
ngc-preserved-env.

Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
Co-authored-by: John Kehayias <john.kehayias@protonmail.com>
2024-01-31 15:33:42 -05:00
John Kehayias
8078757b88
nonguix: multiarch-container: Allow extra shared directories.
Basic fix for #237.

This allows exposing other directories or drives to the nonguix container, for
example to add additional library locations to Steam, by setting
$GUIX_SANDBOX_EXTRA_SHARES.

* nonguix/multiarch-container.scm (make-container-wrapper): Use environment
variable $GUIX_SANDBOX_EXTRA_SHARES to pass extra directories to share with
the container.
2024-01-10 11:57:37 -05:00
John Kehayias
1f91ecd3c0
nonguix: multiarch-container: Set LD_LIBRARY_PATH inside container.
Fixes #303.

Previously LD_LIBRARY_PATH was being set before the container was launched,
which could cause issues on some foreign distros where this alters what is
loaded from an FHS structure.  This was only meant to be set inside the
container, though this didn't cause any issues on a Guix System.

* nonguix/multiarch-container.scm (make-container-wrapper): Move setting
LD_LIBRARY_PATH from here ...
(make-internal-script): ... to here.
2024-01-06 17:01:18 -05:00
John Kehayias
7dd68696a2
nongnu: multiarch-container: Fix missing module on foreign distros.
Fixes #277.

See discussion in above issue for details and some education on what went
wrong here.  In short, we didn't capture the needed (guix build utils) module
in the container script.  On a Guix System this didn't cause any problems as
guix modules are found through set Guile environment variables.  But on a
foreign distro these weren't set without hacky workarounds.  This prevented
Steam from launching with a "no code for module" error.

* nonguix/multiarch-container.scm (make-container-wrapper)[make-container-wrapper]:
Use 'with-imported-modules' for (guix build utils).
2024-01-04 21:01:33 -05:00
John Kehayias
e823034e40
nongnu: Add heroic.
* nongnu/packages/game-client.scm (heroic-client, heroic-extra-client-libs,
heroic-container, heroic-nvidia-container, heroic, heroic-nvidia): New
variables.
* nonguix/multi-arch-container.scm (make-container-wrapper): Preserve "^SSL_"
for heroic to use curl.
(make-internal-script): Add symlink for "/usr/share/glib-2.0".
2024-01-03 23:02:39 -05:00
Timo Wilken
07b884a7b1
nongnu: steam-nvidia: Fix launching .desktop files.
Steam installs .desktop files that refer to an executable called `steam'.
Installing steam-nvidia as the `steam-nvidia' executable breaks this, which
means Steam cannot be launched from its desktop icon.  This also applies to
.desktop files for individual games generated by Steam, when they are copied
from `<ngc-sandbox-home>/.local/share/applications/'.

Fix this by always installing Steam's wrapper executable as `steam'.  We add a
new field using "binary" to keep things shorter.

This has the downside that the `steam' and `steam-nvidia' packages cannot be
installed in the same profile, but likely people wouldn't want to do this
anyway.

Fixes #294.

* nongnu/packages/steam-client.scm (steam-nvidia-container)[binary-name]:
Specify for compatibility with .desktop files.
* nonguix/multiarch-container.scm (<nonguix-container>)[binary-name,
ngc-binary-name]: New field and accessor.
(nonguix-container->package): Use it to set correct executable name.
(make-internal-script): Use it in message.

Co-authored-by: John Kehayias <john.kehayias@protonmail.com>
Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
2024-01-03 17:24:44 -05:00
John Kehayias
c398116f34
nonguix: multiarch-container: Make locale usable by pressure-vessel.
Steam's pressure-vessel startup time can be improved by not having to generate
locales.  So make sure locales are in and used by the pressure-vessel
container by linking the expected location of /usr/lib/locale (presumably so
that pressure-vessel will capture them) and setting $GUIX_LOCPATH.

* nonguix/multiarch-container.scm (make-container-wrapper): Preserve and set
GUIX_LOCPATH.
(make-internal-script): Add symlink for /usr/lib/locale.
2023-11-11 20:56:22 -05:00
John Kehayias
f89556c74c
nonguix: multiarch-container: Preserve MANGOHUD.
Now one can have set MANGOHUD=1 in their environment to have all Steam games
launch with MangoHud, rather than always setting this per game launch
settings.  Likewise for MANGOHUD_CONFIG for configuration.

* nonguix/multiarch-container.scm (make-container-wrapper): Preserve MANGOHUD
environment variables.
2023-11-11 20:56:16 -05:00
John Kehayias
3e698c64a8
nonguix: multiarch-container: Set LD_LIBRARY_PATH (for steam).
Setting $LD_LIBRARY_PATH in the container allows for non-Steam games added to
Steam to launch properly with Proton.  Otherwise they don't make it to the
pressure-vessel container as it seems they start in an environment where the
rest of our setup is not active (e.g. game will fail to launch with an error
about being unable to load libGL.so.1).

* nonguix/multiarch-container.scm (make-container-wrapper): Preserve
LD_LIBRARY_PATH and set it.
2023-11-11 20:56:10 -05:00
John Kehayias
a36cce8028
nonguix: multiarch-container: Remove pressure-vessel workaround.
Setting $PRESSURE_VESSEL_FILESYSTEMS_RO to "/gnu/store" is no longer needed
for Steam as the fix has been merged upstream.  Users can still set this
environment variable (preserved in the container) if needed.

* nonguix/multiarch-container.scm (make-container-wrapper): Remove setting
$PRESSURE_VESSEL_FILESYSTEMS_RO.
2023-11-11 20:56:03 -05:00
John Kehayias
14656d642d
nongnu: steam: Fix to work with newer mangohud.
In 0.7.0 of MangoHud the vulkan implicit layers have different names for 32-
and 64-bit so we no longer need a workaround.

* nonguix/multiarch-container.scm (make-internal-script): No longer create
/usr/share/vulkan/implicit_layer.d.  Symlink instead directly from guix-env.
Remove vulkan layer renaming from mangohud.
2023-10-14 17:09:28 -04:00
John Kehayias
e2aa9e56d4
nongnu: steam: Fix missing tray icon.
Finally, it's back!  Using something like snixembed worked around this before
by using a different tray icon format.

* nongnu/packages/steam-client.scm (steam-client-libs): Add gdk-pixbuf.
* nonguix/multiarch-container.scm (make-internal-script): Add symlink to
/usr/share/mime.
2023-09-03 22:40:05 -04:00
John Kehayias
c61c094e76
nongnu: steam: Allow workaround of white box bug.
See <https://gitlab.com/nonguix/nonguix/-/issues/267> and <https://github.com/ValveSoftware/steam-for-linux/issues/9306>.

* nonguix/multiarch-container.scm (make-container-wrapper): Preserve
QT_X11_NO_MITSHM to allow setting to 1 to workaround an upstream bug where
only a white box is displayed.
2023-07-15 15:51:08 -04:00
John Kehayias
ef015aecf7
nonguix: glibc-for-fhs: Remove variable.
* nonguix/multiarch-container.scm (glibc-for-fhs): Remove.
(fhs-min-libs): Use upstream glibc-for-fhs.
2023-06-29 14:16:12 -04:00
Elijah Malaby
c323f4c866
nongnu: Export steam containers and minor refactor.
nonguix: Make container actually respect the ngc-shared and ngc-exposed fields.

* nongnu/packages/steam-client.scm (steam-container): New variable.  This is to
export the container definition from steam.
(steam-nvidia-container): New variable.  This is the container for steam-nvidia
and now inherits from steam-container.
(steam, steam-nvidia): Container definitions moved to steam-container and
steam-nvidia-container.
* nonguix/multiarch-container.scm (make-container-wrapper): Add ngc-exposed and
ngc-shared to expose and share lists.

Signed-off-by: ison <ison@airmail.cc>
2023-05-29 22:39:12 -06:00
Attila Lendvai
5bc3c9da84
nonguix: Remove unnecessary modules from multiarch-container scripts.
* nonguix/multiarch-container.scm (packages->ld.so.conf)[computed-file]: Remove
with-imported-modules and use-modules.
(make-container-wrapper)[program-file]: Remove with-imported-modules.

Signed-off-by: ison <ison@airmail.cc>
2023-05-29 20:16:11 -06:00
Giacomo Leidi
87c9cdaeda
nonguix: Move nonguix-container to its own module.
* nonguix/multiarch-container.scm: New file. This module makes the container
code from steam-client.scm usable by other packages which require multiarch
support (which is not currently supported by the upstream Guix FHS container).

Signed-off-by: ison <ison@airmail.cc>
2023-05-15 03:45:30 -06:00