mirror of
https://github.com/games-on-whales/wolf.git
synced 2026-10-15 13:02:03 +00:00
[GH-ISSUE #371] Easier NVIDIA volume creation on NixOS #251
Labels
No labels
🧠 1 - 🤖 999
AMD
bug
bug
cannot reproduce
documentation
duplicate
easy
enhancement
enhancement
enhancement
fixed?
fixed?
good first issue
hard
help wanted
Intel
invalid
LXC
medium
moonlight-protocol
Multi GPU
nixos
not a bug
nvidia
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/wolf#251
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @altano on GitHub (Mar 17, 2026).
Original GitHub issue: https://github.com/games-on-whales/wolf/issues/371
Hello,
For users on NixOS (which searching this repo's issues tells me is a non-zero number of users) the Quickstart can be simplified a bit, especially around the NVIDIA volume creation. I've created a re-usable flake that takes your NVIDIA package as input and then produces a usable volume for you. If your package changes (e.g. you update your nixos) it'll produce a new volume automatically.
The flake: https://github.com/altano/flakes/tree/main/wolf-nvidia-vol#how-to-use-it
Using it is as simple as:
Add to your flake.nix:
Add to your Wolf service:
I've tested this in my local setup and it works perfectly. Might need more testing from other people to be considered robust though.
If you want this in the official docs, either feel free to add it or let me know and I can try to submit a PR to do it myself?
(heads up, I originally named this
gow-nvidia-volbut renamed it towolf-nvidia-vol)@JBailes commented on GitHub (Mar 30, 2026):
@altano This has been built into the quickstart script. If you would review the already-merged PR at https://github.com/JBailes/wolf/pull/4 to verify it works on nix-os (And even better, test it yourself!), it would be great.
@clsty commented on GitHub (Apr 28, 2026):
This works for me (modified from the nix file generated using https://github.com/JBailes/wolf ).
@JBailes According to my test, the generated Nix file has two problems, I've created a PR to fix it.
@altano commented on GitHub (Jun 1, 2026):
FWIW there are a couple of things here that aren't very idiomatic for nix:
virtualisation.oci-containers.containers.imagebeing set toghcr.io/games-on-whales/wolf:stablemeans the nix setup is not reproducible and always pulls the latest stable imagePlus you're maintaining a complicated wolf.nix in your personal configuration at that point.
If you want to support nix I would recommend going a different approach:
Then your install instructions go from "run wolf.sh, import wolf.nix into your user configuration" (very not nix) to "import this flake" (very nix). The downside: you'll be duplicating some work by keeping the flake.nix config options in sync with your docker container config options. If you're at all possibly amenable to going that route, I could demonstrate what that would look like by shipping a wolf flake in my repo so you can see an example. Let me know.
Oh, and regarding the docker image label/hash, I would recommend this (regardless of whether or not you keep the wolf.sh or make a flake.nix):
you need a ci task (or re-use the docker publish one) that runsyou don't even need this actuallynix flake updateto pick up the stable.json change and updates flake.lockI can potentially help with that too if you're interested. Let me know how you'd like to proceed:
@altano commented on GitHub (Jun 1, 2026):
ALSO: in an ideal world, the runtime config which is still currently this mutable blob on the server that's modified out-of-band, would be configured via nix.
@altano commented on GitHub (Jun 3, 2026):
Okay, I felt like making this nix flake for some reason:
https://github.com/altano/flakes/tree/main/wolf
Usage is dead simple and doesn't require a bash script generating a wolf.nix. You just import the flake and use it. See the readme for examples.
It allows you to declaratively define config.toml options, user profiles, and apps from nix.
There's a nightly github CI action that generates a containers.json based on the latest sha hash of every Wolf docker image based on their tag, e.g. currently
ghcr.io/games-on-whales/wolf:stable=>sha256:8b0d3a744237f009e9ff5195672df82712f095475f7cc9e92dc8bcd8ac3a31dc, so people who use this flake will get the latest docker containers as published by you, without my needing to update manually, in a fully nix-friendly and reproducible way.If you love it, I'd be happy to help you pull the flake into your repo. If you hate it then people who want it can just use it from my flake repo. Up to you, @JBailes !
@clsty commented on GitHub (Jun 3, 2026):
Personally I think it'll be better to create/transfer-to a repo under this organization (games-on-whales), which could mean easier access for new users, more feedback and maintenance in long term. For both https://github.com/JBailes/wolf and https://github.com/altano/flakes .
For example,
games-on-whales/wolf-quickstart.JBailes/wolfas before, then we could transferaltano/flakesinto a newgames-on-whales/wolf-flakes.And @ABeltramo I also need your opinion here.
@JBailes commented on GitHub (Jun 3, 2026):
I tried to get the quickstart script on GOW before, Abe didn't like the idea ;)
@clsty commented on GitHub (Jun 3, 2026):
I see. And yes, that also makes sense cuz quickstart script isn't necessary for non-NixOS distros. We already have
docker-compose.ymlfrom GoW document which works quick and well.However for NixOS users
altano/flakesis almost a must-to-have, and the only way they'll get to know this repo would be searching issues, which probably happens after they've experienced painful hours on trying thedocker-compose.ymlfrom GoW document and find it not working at all on NixOS.We could also write a note in GoW document about NixOS, however in that case we'd better provide a link to an official repo (
games-on-whales/wolf-flakes, not exist yet) and maintain it for long-term.@ABeltramo commented on GitHub (Jun 3, 2026):
For completeness, here's my view of the quickstart script https://github.com/games-on-whales/wolf/pull/382#issuecomment-4182023584
As for NixOS, something like what was posted earlier by @clsty (https://github.com/games-on-whales/wolf/issues/371#issuecomment-4336228645) makes sense, and it looks to me like the Podman quadlet version that we have in the quickstart guide. I'd be happy to add something like that to the docs.
I kind of struggle to see the benefits of having something like
altano/flakesin GOW..First off the config.toml file isn't stable, it's versioned, and it will change between releases. Having that deep integrated into the flake means that every change to Wolf needs a change in the flake adding unnecessary maintenance burden to the project. On top of that, the file will be changed at runtime by Wolf (upgrading between versions, and when a user pairs via Moonlight) and obviously by WolfDen (via the Wolf APIs though, which is the stable way of configuring Wolf). Any change that happens there wouldn't be reflected in the state of the flake, potentially breaking things.
As for pinning down a version of Wolf for reproducibility, that's already part of Docker. You can pin down an image instead of pulling the latest
:stable; this isn't a NixOS unique property. And the result wouldn't be reproducible anyway because Wolf will spin up additional images that aren't tied to the tag of the Wolf container. WolfUI also embeds a way to update the app images by pulling the latest. You could pin down all the images in yourconfig.toml, but again, that's a property of Docker.I'm sorry if this comes of as rude, but I need a very strong motivation for having to maintain another project, in another language. So far, I struggle to see the advantage apart from some easier ergonomics for NixOS users. And this is still missing the logic to support non Nvidia HW too, I wonder how much complexity that would add.
@clsty commented on GitHub (Jun 3, 2026):
FYI, https://github.com/games-on-whales/wolf/issues/371#issuecomment-4336228645 is a generated result, which is specific to Nvidia HW.
For both Nvidia HW and non Nvidia HW,
altano/flakesandJBailes/wolfhave already taken them into consideration.@ABeltramo commented on GitHub (Jun 3, 2026):
Not according to the README for
altano/flakesthough 😉@clsty commented on GitHub (Jun 3, 2026):
For
altano/flakesI can see it supporting non-Nvidia HW according togithub.com/altano/flakes@07623e7a34/wolf/module.nix (L343-L349)Update: Oh I missed the description.
@clsty commented on GitHub (Jun 3, 2026):
Well, my point is that if we're providing such config example for NixOS users in GoW document, then we'll also have to include a link to a non-GoW-official repo
"github:altano/flakes?dir=wolf-nvidia-vol"in GoW document (this is a must forwolf-nvidia-volto work):@ABeltramo If you think it's fine, then surely I'm also fine with it. I was just personally prefer a project to self-contain the directly relative part.
@altano commented on GitHub (Jun 3, 2026):
Intel/AMD are not supported yet with my flake as I don't have hardware to test on, so I can't add that. But, that doesn't mean you can't use Intel/AMD GPUs: you can use your Intel/AMD GPU if you configure it yourself, just like with the current quickstart script/nix config.
Taking a step back, let me try to summarize the conversation so far, which can hopefully guide the conversation:
Current approach - Bootstrap Bash Script:
Pros
Cons
My (@altano) wolf flake:
Pros
Cons
stabledocker image could break this flake when it gets automatically pulled in via the nightly GitHub action. The user's nextnix flake updatewould pull the broken version.So what should we do?
I think there are two totally separate questions:
The implementation details of my flake aren't super important until we decide the above.
My take - opinions start here!
I would argue that the quick-start bash script is probably not worth it and you shouldn't bother. It's not a bad idea! And some people might find it helpful. But it's so far from idiomatic Nix that it's probably not worth the maintenance burden to you all. That's for you to decide tho of course.
If you decide you want to support NixOS as a first-class platform, I would argue that the only way to do it is with a Nix flake that at least tries to accomplish some of the same goals as mine, whether or not it does so in the same way.
The implementation details are a totally separate question, such as:
Apologies if I misrepresented anything in my recap above. Just trying to summarize things.
@altano commented on GitHub (Jun 3, 2026):
Intel/AMD are not supported yet with my flake as I don't have hardware to test on, so I can't add that. But, that doesn't mean you can't use Intel/AMD GPUs: you can use your Intel/AMD GPU if you configure it yourself, just like with the current bootstrap script/nix config.
Taking a step back, let me try to summarize the conversation so far, which can hopefully guide the conversation:
Current approach - Bootstrap Bash Script:
Pros
Cons
My (@altano) wolf flake:
Pros
Cons
stabledocker image could break this flake when it gets automatically pulled in via the nightly GitHub action. The user's nextnix flake updatewould pull the broken version. The breakage is easy to revert (you just go back to the previous flake hash and that fixes everything).So what should we do?
I think there are two totally separate questions:
The implementation details of my flake aren't super important until we decide the above.
My take - opinions start here!
I would argue that the bootstrap bash script is probably not worth it and you shouldn't bother. It's not a bad idea! And some people might find it helpful. But it's so far from idiomatic Nix that it's probably not worth the maintenance burden to you all. That's for you to decide tho of course.
If you decide you want to support NixOS as a first-class platform, I would argue that the only way to do it is with a Nix flake that at least tries to accomplish some of the same goals as mine, whether or not it does so in the same way.
The implementation details are a totally separate question, such as:
Apologies if I misrepresented anything in my recap above. Just trying to summarize things.
@altano commented on GitHub (Jun 3, 2026):
Sure, in theory, but you'd have to write a script to update all the hard-coded Docker image hashes to do an update. No one does this for a reason: it's too hard/inconvenient. With NixOS you just run
nix flake update wolfand you'd update Wolf and all the Docker images.All the additional images that are provided by GoW (e.g. Lutris) are handled in the same way. If you put them in your profile, you're getting pinned Docker images. The only ones that aren't pinned are the user's custom Docker images because we don't manage those, but those are probably versioned Dockerfiles in the repo anyway.
Sure but this is a manual, not automatic, action, and redeploying your flake will revert the images. This is fairly standard Nix behavior.
Not at all! The maintenance burden is real and you having concerns is extremely expected. It's not rude at all.
I hope I explained above why this approach improves the ergonomics a lot!
@ABeltramo commented on GitHub (Jun 4, 2026):
But.. you did exactly that 😅 You've created the script it's not a unique property of NixOS.
I think we are pretty much on the same page on the pros/cons. Personally I don't use NixOS, so I'm not going to add first support for it. I also personally think that it shouldn't be that complex: your repo is quite large already, with the main
module.nixclose to 1000 lines. But that's just me rambling at this point..Anyway, the project is open source, anyone is free to do it; would any of you want to be an official maintainer of the flake? Does NixOS manage this like other distros where packages are done and maintained by the community outside the original upstream repos?
I'm open to ideas, I'd be happy to link to an external repo officially in the docs and/or bring such a repo directly into our org. We already have quite a few subprojects that aren't necessarily maintained by me personally but are more of a "community project".
@altano commented on GitHub (Jun 6, 2026):
Seems extremely straightforward.
Maybe the best course of action though is to just reference my flake as a community resource in the install instructions for NixOS users and dump the quickstart/bootstrap script? There's probably no reason to make my flake an official part of the org if you have no intention of using NixOS or maintaining it. Unless there's a benefit I'm missing. The pointer to the flake should enable discovery and that's the important thing.
Thoughts everyone?
I'm ultimately happy to help maintain it either way, as long as I'm an active Wolf user. Whether you want to absorb the flake into the org or just leave it on my user, it's fine by me and I will pitch in.
That's fair, heh, BUT: I can write 50 lines of bash in the flake and then no one else is managing the docker hashes, meanwhile you're suggesting USERS can write such a script. In my case the flake users don't need it. With Docker, you can't abstract that away. But whatever, this isn't really important anyway.
@altano commented on GitHub (Jun 6, 2026):
Oh and:
It's actually more like a wiki than a conventional distro. For example, I don't think there's a popularity threshold for adding a project to nixpkgs.
There's also the NixOS
services.*configuration. The bar might be higher there, I don't know.I would editorialize and suggest that trying to get Wolf into nixpkgs/nixos should have a slightly higher bar for doing things the nix way, though, and that if we went down that road we should build Wolf itself for the nix package directly instead of abstracting the docker images.