Play Factorio on NixOS with Secrix!

Quinn is gong to be doing some Nixos related live twitch streams.

Check it out and follow for notifications.



do you have a link to the final result? (for those who missed the stream)


I don’t understand what is Secrix (and I can’t use grep on the audio / video :sweat_smile: )

Ah, i see, you can find more about it here.


1 Like

I was looking for a link to the final repo/project but thanks

Did you know? You can actually play Factorio on NixOS without secrix!

Did they in fact play Factorio at some point? I didn’t find it while skimming the preview.

Hi, just saw that Lee posted this! we ended up using secrix to config my hercules agent, since I looked up factorio on the wiki and couldn’t find the override that I had remembered being there.

It turns out, I later noticed, that the override is in the error message when you try NIXPKGS_ALLOW_UNFREE=1 nix-shell -p factorio:

  packageOverrides = pkgs: {
    factorio = pkgs.factorio.override {
      username = "FactorioPlayer1654";
      token = "d5ad5a8971267c895c0da598688761";

so installing factorio is indeed a usecase for declarative secrets management.

The point of the stream was to learn about declarative secrets (specifically in secrix, which is an age wrapper for nixos in beta), so I pivoted to another task when I didn’t see the override on the wiki.

I can do nixos gaming streams if there’s interest, I know a thing or two about lutris and battlenet but most of that has more to do with intel than with nixos (the os stuff is the easy part). I can also do another stream where we actually put the override into my infra repo (with secrix) then boot the game and talk about nixos while I play, maybe eventually a version of that with a private server. I’m open to different things, can post nixos related streams in this thread.


Here’s what hercules secrets dir looks like in secrix and here’s the full hercules module

Could be git-crypt, agenix, sops-nix, etc. I haven’t played factorio since I made my whole personal infra repo public, though, cuz I’ve been procrastinating on declarative secrets (had been doing it all by imperatively patching it in to a given machine)

1 Like

So… I’m not the only person playing actual games on nixOS :scream:

(no, “messing with your flake” doesn’t count as a game)

On a serious note, never thought about making the gaming side this much declarative.
Guess it would be a good idea fiddling with steam and epic authentication like that too.

1 Like

Yeah, it works!

I’ve had super success with stream, proton and some heavy weight games…

in fact it feels kinda of unreal in some sense.

You got anything in particular your playing??

I’ve had success with steam (and proton) and epic inside lutris. Played some Oxygen Not Included, GTA V Online, Borderlands 2, Saints Row The Third (epic games remastered edition)… lots of random stuff from the steam lib actually.

But I saw some $HOME pollution from some tools/games (steam itself may be the biggest offender) and I never got into custom proton runtimes (maybe I should’ve made a flake to build and plug glorious egg releases into a home-manager config?).

But now that I think about the auth case, given 2-step is mostly forced, not sure if we could make use of secret management here. I mean we could but it wouldn’t eliminate the interactive login step.