Skip to content

Commit c2b91b7

Browse files
Merge branch 'Vanderscycle:main' into main
2 parents c18b5b3 + 6f4b5dd commit c2b91b7

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

nix-darwin/flakes/monolith/configuration.nix

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
sops
6969
git
7070
vim
71-
factorio-headless
7271
iptables
7372
];
7473

@@ -96,8 +95,25 @@
9695
# Copy/Link the save file (use either C or L)
9796
"C /var/lib/factorio/saves/save1.zip - - - - ${builtins.path { path = ./save1.zip; }}"
9897
];
98+
nixpkgs.overlays = [
99+
(
100+
final: prev:
101+
let
102+
version = "2.0.47";
103+
sha256 = "09lsyilaf81jb5v34qx484qqy42pnmq7lqzb4x17k90nfv3j1wzh";
104+
url = "https://factorio.com/get-download/${version}/headless/linux64";
105+
in
106+
{
107+
factorio-headless = prev.factorio-headless.override {
108+
inherit version sha256 url;
109+
};
110+
}
111+
)
112+
];
113+
99114
services.factorio = {
100115
bind = "192.168.4.129";
116+
package = pkgs.factorio-headless;
101117
enable = true;
102118
public = true;
103119
username = builtins.readFile config.sops.secrets."admin".path;
@@ -113,7 +129,6 @@
113129
max_players = 16;
114130
};
115131
autosave-interval = 20;
116-
# When not present in /var/lib/${config.services.factorio.stateDirName}/saves, a new map with default settings will be generated before starting the service.
117132
saveName = "save1";
118133
game-name = "[NixOs] factorio";
119134
description = "Factorio on nixos";

0 commit comments

Comments
 (0)