<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.nixos.org/w/index.php?action=history&amp;feed=atom&amp;title=Factoriolab</id>
	<title>Factoriolab - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.nixos.org/w/index.php?action=history&amp;feed=atom&amp;title=Factoriolab"/>
	<link rel="alternate" type="text/html" href="https://wiki.nixos.org/w/index.php?title=Factoriolab&amp;action=history"/>
	<updated>2026-05-09T22:17:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.0</generator>
	<entry>
		<id>https://wiki.nixos.org/w/index.php?title=Factoriolab&amp;diff=26288&amp;oldid=prev</id>
		<title>Iedame: Created Factoriolab page with installation and usage instructions for NixOS.</title>
		<link rel="alternate" type="text/html" href="https://wiki.nixos.org/w/index.php?title=Factoriolab&amp;diff=26288&amp;oldid=prev"/>
		<updated>2025-09-08T22:18:03Z</updated>

		<summary type="html">&lt;p&gt;Created Factoriolab page with installation and usage instructions for NixOS.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[https://github.com/factoriolab/factoriolab Factoriolab] is an Angular-based calculator for factory games like Factorio and Dyson Sphere Program. It determines resource and machine requirements for your desired objectives.&lt;br /&gt;
&lt;br /&gt;
== Installing on NixOS ==&lt;br /&gt;
Factoriolab is a web-based calculator. Therefore, the Nix package provides only the static files needed to run the application, which you then access via a web server.&lt;br /&gt;
&lt;br /&gt;
For the following examples we will use Python&amp;#039;s built-in HTTP server, if you prefer to have it always available you can skip installing python and follow the Nginx example.&lt;br /&gt;
&lt;br /&gt;
To install Factoriolab on NixOS, add the following to your configuration.nix file. This adds the factoriolab and python packages to your system&amp;#039;s global environment.&lt;br /&gt;
&lt;br /&gt;
{{file|/etc/nixos/configuration.nix|nix|3=environment.systemPackages = with pkgs; [&lt;br /&gt;
    factoriolab&lt;br /&gt;
    python3&lt;br /&gt;
  ];}}&lt;br /&gt;
After rebuilding your system with nixos-rebuild switch, proceed to the Usage section.&lt;br /&gt;
&lt;br /&gt;
==== Temporary Installation ====&lt;br /&gt;
&lt;br /&gt;
If you only need to use it temporarily, you can install the packages and enter a shell with them using nix-shell:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
nix-shell -p factoriolab python3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Once you are inside the shell, proceed to the Usage section.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
You must serve the Factoriolab files using a web server. Here are two recommended methods.&lt;br /&gt;
&lt;br /&gt;
==== Using Python&amp;#039;s HTTP Server (Recommended for temporary use) ====&lt;br /&gt;
&lt;br /&gt;
First, locate the Factoriolab files within the Nix store and start Python&amp;#039;s built-in HTTP server from that directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd $(nix-build &amp;quot;&amp;lt;nixpkgs&amp;gt;&amp;quot; -A factoriolab)/share/factoriolab &amp;amp;&amp;amp; python3 -m http.server&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command will start the server, and you&amp;#039;ll see a message like: &amp;quot;Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To use the calculator, navigate to http://localhost:8000/ in your web browser. It will be available until you close your terminal.&lt;br /&gt;
&lt;br /&gt;
==== Using Nginx (Permanent Installation) ====&lt;br /&gt;
&lt;br /&gt;
For a permanent, always-available installation, you can set up Nginx to serve the static files.&lt;br /&gt;
&lt;br /&gt;
Add the following to your NixOS configuration to enable Nginx and configure a virtual host for Factoriolab:&lt;br /&gt;
&lt;br /&gt;
{{file|/etc/nixos/configuration.nix|nix|3=&lt;br /&gt;
# Enable Nginx&lt;br /&gt;
services.nginx.enable = true;&lt;br /&gt;
&lt;br /&gt;
# uncomment if you need to use this from another machine&lt;br /&gt;
# networking.firewall.allowedTCPPorts = [ 80 ]; &lt;br /&gt;
&lt;br /&gt;
services.nginx.virtualHosts.&amp;quot;localhost&amp;quot; = {&lt;br /&gt;
  serverName = &amp;quot;localhost&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
  root = pkgs.factoriolab + &amp;quot;/share/factoriolab&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
};}}&lt;br /&gt;
After rebuilding your system with nixos-rebuild switch, you will be able to access Factoriolab via http://localhost/.&lt;br /&gt;
&lt;br /&gt;
[[Category:Applications]]&lt;/div&gt;</summary>
		<author><name>Iedame</name></author>
	</entry>
</feed>