Running Factorio natively on nixos/flakes/home-manager

I'm gonna clean this up and throw it on the nixos wiki, but here are the salient points for any future factorio players trying to get it going on nix/flakes.

Even if you buy factorio on steam wube lets you download a drm free binary from their website once you link your steam account/or just buy it from them in the first place. The game runs natively on linux, so steam/proton is just bloat. Beyond that, it's actually been packaged on nixpkgs, but running NIXPKGS_ALLOW_UNFREE=1 nix-shell -p factorio-space-age-experimental as a first step gets you an incredibly well written error message pointing you towards two solutions. Solution one is pulling it using your account and token values, but they'll be stored readable in the nix store on your machine. Practically speaking not a problem, but also kinda suboptimal. Per the error message If you want to do it that way you can set the following in /etc/nix/nixpkgs-config.nix

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

I haven't tried that yet, and there were hiccups with option number 2 because I use flakes, so I'll need to try it before I update the wiki. Option number 2 is to download factorio off the website manually, then run nix-prefetch-url file://$HOME/Downloads/factorio-space-age_linux_2.0.77.tar.xz --name factorio_expansion_x64-2.0.77.tar.xz to import it into the store, save the hash generated by that command, and then to add something like the following options into your config.

This first flake.nix segment is really large even after I trimmed my inputs/outputs, and the only relevant line is "(import ./home/factorio.nix)", but I wanted to make it clear where to insert it

        # ./flake.nix
        {
          description = "horsey flake 0.1";
        
          inputs = {
          };
        
          outputs = inputs @ {
            ...
          }: let
               pkgs = nixpkgs.legacyPackages.x86_64-linux;
             in
               rec {
            nixosConfigurations = {
              sleipnir = nixpkgs.lib.nixosSystem rec {
                system = "x86_64-linux";
                specialArgs = { inherit inputs; inherit system; };
                modules = [
                  ./configuration.nix
                  home-manager.nixosModules.home-manager
                  (import ./home/factorio.nix) #      <----------------!!!!!!!!!!
                  {
                   home-manager = {
                     extraSpecialArgs = {
                       inherit inputs;
                       inherit system;
                     };
                   };
                   home-manager = {
                     useGlobalPkgs = true;
                     useUserPackages = false;
                     backupFileExtension = "bak";
                     users.horsey.imports = [
                       ./home.nix
                       ];
                       sharedModules = [ vicinae.homeManagerModules.default ];
                   };
                  }
                ];
              };
            };
          };
        }

Add factorio to your list of pkgs, I'm using home-manager

        # ./home/pkgs-home.nix
        
        { config, pkgs, ... }: {
        
            home.packages = with pkgs; [
            factorio
            ];  

The hash in this was generated by the prefetch url command from earlier.

        # ./home/factorio.nix
        {
          nixpkgs.overlays = [
            (final: prev: {
              factorio = prev.factorio.overrideAttrs (oldAttrs: {
                src = prev.requireFile {
                  name = "factorio_expansion_x64-2.0.77.tar.xz";
                  sha256 = "190hkz9f1z7rk9w7kr6p6garm5h4qkhwv2ladss9qmjrhivx9306"; 
                  message = "Using local package but it expects a message and url";
                  url = "localhost";
                };
              });
            })
          ];
        }

This last setting is recommended by the error message to prevent the manually loaded factorio src from being discarded by GC.

        # ./sys/settings-sys.nix   #this is imported into my configuration.nix
        system.extraDependencies = [
          factorio.src
        ];

All the best!

reddit.com
u/Slinkinator — 7 days ago

Theory/question

Ive been rereading older chapters while i wait for the update, and I wanted to ask-

​

Is it a common theory that the elf girls bloodline requires the subject to learn both a fire and a wood technique at rank 1 for it to 'ignite,' foreshadowed by marcus observing her soul was strong, like someone who'd practiced awhile, but not as impressive as regulus's, as well as her indifference to her tree, because she knows its temporary prior to the transformation/awakening?

**and by extension i think the technique she ends up with might be "the fire orchid" technique, or the "flame of the effervescent orchid" or w/e and her spirit is gonna be a fire flower etc

I think about this a bit, not super invested, happy to be surprised that im wrong when we find out.

**This post was prompted by a shower thought, that a possible reason marcus hasnt detected the other technique or previously learned spells via the soul seed is because she hasn't used her other technique since being implanted, and maybe unattuned any spells she had learnt prior to the apprenticeship.

**Extra baseless theory crafting = i think she probably has a recall amulet, or maybe shes still an 'avatar', which is why she was indifferent to the threat from thunder hall/crystal mountain, and that as advanced as her world/empire was, rank 7 mages were probably still very rare, and that if that dynamic is ever explored we'll get a confirmation marcus can take out a mage a rank above him first.

reddit.com
u/Slinkinator — 10 days ago

Uhm actually question

"The Colour of Magic", the 1983 debut of Terry Pratchett's Discworld series, is set on a flat world on the backs of four giant elephants standing on the shell of Great A'Tuin, a giant space turtle.

The novel follows Rincewind, a hapless wizard, taking the wealthy foreigner Twoflower, "the Discworld's first tourist," on a fake tour that escalates into increasingly dangerous misadventures, while Terry Pratchett introduces his audience to the concept of a weird satirical flat world floating through space.

Answer: While the "The Colour of Magic" is the 1983 debut of the Discworld fantasy series and the Discworld fantasy setting, a flat world on the backs of giant elephants on the back of a giant turtle, 2 years earlier in 1981Terry Pratchett introduced his audience to the concept of a flat earth in 'Strata', a science fiction novella modelled after 'Ringworld' by Larry Niven, but instead of an alien ringworld it explores a mechanical flat earth inhabited by a facsimile of historical earth cultures, which the characters recognise when they rescue Erik the Red from sailing off the edge of the world.

reddit.com
u/Slinkinator — 11 days ago
▲ 2 r/bbc+2 crossposts

What previous posts discussed how the bbcs lack of candor covering their enablement of Jimmy Savilles crimes affected our trust?

Earlier today i made a post asking how the bbcs lack of candor in covering the corporations complicity and assistance in his crimes over 50 years affected other bbc readers trust in the organisations news coverage.

It was removed due to being low effort and how many other posts have covered the same topic, and because discussing it leads to comments that impinge on the posting guidelines.

A) I can understand how it would lead to offensive comments, but that is not actually a violation of your rules, as posted they only prohibit posts and comments that are inappropriate, not ones that inapropriate people can be offensive in relation to.

B) It was not low effort, I read about 15 bbc articles prior to posting it, and im happy to disect them at length in my opening post if that would be more appropriate.

C) I CANT FIND A SINGLE POST on this subreddit discussing the bbcs lack of candor in the wake of the revelations about jimmy savilles conduct and how the bbc actively enabled it for 50 years.

D) i linked and mentioned the Dame Smith report, as an example of more effort I'll note that Dame Smith noted in her report that there were more than 1000 victims just in the bbc's main studios changing room during ~20 years, and the bbc analysis of her report instead said there were only ~175 confirmed victims over 50 years between the dj'ing, the casting, top of the pops, and the hospitals. To my mind, thats so disingenuous it qualifies as deceit.

E) To that end, the BBC is still being dishonest in their coverage of their organisations historically disgusting behaviour.

F) please explain why this is low effort, and please link to any other post on this forum that addresses the same topic, and please quote the part of your rules which this post violates. This is a subreddit dedicated to the bbc, and youre asserting that its impossible to discuss how the bbc mishandled the most egregious moral, ethical, and legal failing of its history?

*Edit:You do see that shutting down discussion of the topic because its uncomfortable and will make your job harder is literally what bbc leadership did for 50 years enabling his crimes? Truly, think about who you are and what you're doing

*Edit #2, I cant post on here anymore, but whats wild is that the questions posed in the comments, why didnt the tabloids report, why didnt the cops intervene, clearly he wasn't alone, have all been answered in the years since it surfaced, but the BBC doesnt report on it. Saville was a popular and commercially valuable writer for the tabloids whose reporters tried to report on him. He went out of his way to befriend and socialize with cops for years. He was friends with Prince Andrew and Lord Mountbatten, King Charles uncle, who were both very priviliged and unpleasent people. It's such a bummer this is stuff the BBC is incapable of approaching, and its damaged my ability to trust them. Just wanted to talk to other people who engage with it and see how people felt.

reddit.com
u/Slinkinator — 2 months ago