diff --git a/flake.lock b/flake.lock index 805e68b..7f1c54e 100644 --- a/flake.lock +++ b/flake.lock @@ -322,6 +322,22 @@ "type": "github" } }, + "master": { + "locked": { + "lastModified": 1665245146, + "narHash": "sha256-OhAD7mOpsfHqz8OR78PirgqF3vB1fgnENYgdasbmaM0=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "ab92858d678818839843d19050942e841a04abd1", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, "naersk": { "inputs": { "nixpkgs": [ @@ -497,6 +513,7 @@ "digga": "digga", "home": "home", "latest": "latest_2", + "master": "master", "naersk": "naersk", "nixos": "nixos", "nixos-generators": "nixos-generators", diff --git a/flake.nix b/flake.nix index 4bb0249..d4c4481 100644 --- a/flake.nix +++ b/flake.nix @@ -10,6 +10,7 @@ # Track channels with commits tested and built by hydra nixos.url = "github:nixos/nixpkgs/nixos-22.05"; latest.url = "github:nixos/nixpkgs/nixos-unstable"; + master.url = "github:nixos/nixpkgs/master"; pub-solar.url = "github:pub-solar/nixpkgs/fix/use-latest-unstable-yubikey-agent"; digga.url = "github:pub-solar/digga/fix/bootstrap-iso"; @@ -69,6 +70,7 @@ overlays = [ ]; }; latest = { }; + master = { }; }; lib = import ./lib { lib = digga.lib // nixos.lib; }; diff --git a/hosts/chocolatebar/chocolatebar.nix b/hosts/chocolatebar/chocolatebar.nix index 9b55e06..6819481 100644 --- a/hosts/chocolatebar/chocolatebar.nix +++ b/hosts/chocolatebar/chocolatebar.nix @@ -8,6 +8,7 @@ in imports = [ ./configuration.nix ./virtualisation + ./factorio ]; config = { @@ -27,6 +28,7 @@ in environment.systemPackages = with pkgs; [ wayvnc drone-docker-runner + stdenv.cc.cc.lib ]; age.secrets."vnc-key.pem" = { @@ -42,10 +44,16 @@ in pub-solar.sway.vnc.enable = true; pub-solar.ci-runner.enable = true; - home-manager.users."${psCfg.user.name}".xdg.configFile = mkIf psCfg.sway.enable { - "sway/config.d/10-autostart.conf".source = ./.config/sway/config.d/autostart.conf; - "sway/config.d/10-input-defaults.conf".source = ./.config/sway/config.d/input-defaults.conf; - "sway/config.d/10-screens.conf".source = ./.config/sway/config.d/screens.conf; + home-manager.users."${psCfg.user.name}" = { + xdg.configFile = mkIf psCfg.sway.enable { + "sway/config.d/10-autostart.conf".source = ./.config/sway/config.d/autostart.conf; + "sway/config.d/10-input-defaults.conf".source = ./.config/sway/config.d/input-defaults.conf; + "sway/config.d/10-screens.conf".source = ./.config/sway/config.d/screens.conf; + }; + + home.sessionVariables = { + NIX_CC = "${pkgs.stdenv.cc}"; + }; }; }; } diff --git a/hosts/chocolatebar/factorio/default.nix b/hosts/chocolatebar/factorio/default.nix new file mode 100644 index 0000000..f7e4525 --- /dev/null +++ b/hosts/chocolatebar/factorio/default.nix @@ -0,0 +1,38 @@ +{ config, pkgs, lib, self, ... }: +with lib; +let + psCfg = config.pub-solar; + xdg = config.home-manager.users."${psCfg.user.name}".xdg; + + far-reach = pkgs.stdenv.mkDerivation rec { + pname = "factorio-far-reach"; + version = "1.1.2"; + src = ./far-reach_1.1.2.zip; + phases = [ "installPhase" ]; + deps = [ ]; + installPhase = '' + mkdir -p $out + cp $src far-reach_1.1.2.zip + ''; + }; +in +{ + config = { + services.factorio = { + enable = true; + port = 34197; # The default, but make it explicit + lan = true; + admins = [ + "doubtwriter" + "scottjive" + ]; + openFirewall = true; + autosave-interval = 3; + game-name = "Babes plays"; + requireUserVerification = false; + mods = [ + far-reach + ]; + }; + }; +} diff --git a/hosts/chocolatebar/factorio/far-reach_1.1.2.zip b/hosts/chocolatebar/factorio/far-reach_1.1.2.zip new file mode 100644 index 0000000..4bae7ec Binary files /dev/null and b/hosts/chocolatebar/factorio/far-reach_1.1.2.zip differ diff --git a/overlays/overrides.nix b/overlays/overrides.nix index 243373b..3471932 100644 --- a/overlays/overrides.nix +++ b/overlays/overrides.nix @@ -21,12 +21,17 @@ channels: final: prev: { tdesktop arduino arduino-cli + steam ; inherit (channels.pub-solar) yubikey-agent ; + inherit (channels.master) + factorio-headless + ; + haskellPackages = prev.haskellPackages.override (old: {