add mapfm poster back
This commit is contained in:
parent
47a4f3f9a7
commit
d3662d77d0
8 changed files with 341 additions and 191 deletions
|
|
@ -1,30 +1,43 @@
|
|||
{lib, pkgs, config, ...}: let
|
||||
factorioVersion = version: sha: pkgs.factorio-headless.overrideAttrs (_: {
|
||||
inherit version;
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://factorio.com/get-download/${version}/headless/linux64";
|
||||
name = "factorio-headless-${version}.tar.xz";
|
||||
sha256 = sha;
|
||||
};
|
||||
});
|
||||
getMods = modDir: let
|
||||
modList = lib.pipe modDir [
|
||||
builtins.readDir
|
||||
(lib.filterAttrs (k: v: v == "regular"))
|
||||
(lib.mapAttrsToList (k: v: k))
|
||||
(builtins.filter (lib.hasSuffix ".zip"))
|
||||
];
|
||||
validPath = modFileName:
|
||||
builtins.path {
|
||||
path = modDir + "/${modFileName}";
|
||||
name = lib.strings.sanitizeDerivationName modFileName;
|
||||
{ lib
|
||||
, pkgs
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
factorioVersion =
|
||||
version: sha:
|
||||
pkgs.factorio-headless.overrideAttrs (_: {
|
||||
inherit version;
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://factorio.com/get-download/${version}/headless/linux64";
|
||||
name = "factorio-headless-${version}.tar.xz";
|
||||
sha256 = sha;
|
||||
};
|
||||
modToDrv = modFileName:
|
||||
pkgs.runCommand "copy-factorio-mods" {} ''
|
||||
mkdir $out
|
||||
ln -s '${validPath modFileName}' $out/'${modFileName}'
|
||||
''
|
||||
// { deps = []; };
|
||||
});
|
||||
getMods =
|
||||
modDir:
|
||||
let
|
||||
modList = lib.pipe modDir [
|
||||
builtins.readDir
|
||||
(lib.filterAttrs (k: v: v == "regular"))
|
||||
(lib.mapAttrsToList (k: v: k))
|
||||
(builtins.filter (lib.hasSuffix ".zip"))
|
||||
];
|
||||
validPath =
|
||||
modFileName:
|
||||
builtins.path {
|
||||
path = modDir + "/${modFileName}";
|
||||
name = lib.strings.sanitizeDerivationName modFileName;
|
||||
};
|
||||
modToDrv =
|
||||
modFileName:
|
||||
pkgs.runCommand "copy-factorio-mods" { } ''
|
||||
mkdir $out
|
||||
ln -s '${validPath modFileName}' $out/'${modFileName}'
|
||||
''
|
||||
// {
|
||||
deps = [ ];
|
||||
};
|
||||
in
|
||||
builtins.map modToDrv modList;
|
||||
factorioContainer = name: factorio-config: {
|
||||
|
|
@ -46,27 +59,33 @@
|
|||
};
|
||||
privateUsers = "no";
|
||||
|
||||
config = { config, pkgs, lib, ... }: {
|
||||
systemd.services.factorio.serviceConfig.User = "factorio";
|
||||
services.factorio = factorio-config // {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
config =
|
||||
{ config
|
||||
, pkgs
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
{
|
||||
systemd.services.factorio.serviceConfig.User = "factorio";
|
||||
services.factorio = factorio-config // {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
|
||||
game-name = name;
|
||||
saveName = name;
|
||||
stateDirName = "factorio";
|
||||
game-name = name;
|
||||
saveName = name;
|
||||
stateDirName = "factorio";
|
||||
};
|
||||
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
|
||||
networking = {
|
||||
firewall.enable = false;
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
|
||||
networking = {
|
||||
firewall.enable = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
@ -85,20 +104,31 @@ in
|
|||
owner = "factorio";
|
||||
};
|
||||
|
||||
containers = factorioContainer "tawney" {
|
||||
autosave-interval = 20;
|
||||
admins = [ "jonay2000" "computerdruid" "pineapple" ];
|
||||
extraSettingsFile = config.sops.secrets.factorio.path;
|
||||
# mods = getMods ../../factorio-mods/tawney;
|
||||
package = factorioVersion "2.0.66" "sha256-8bOXbqzE4jOADTmdkABsNW+jZvXWQ0HFBMlcDLoyHAY=";
|
||||
port = 20001;
|
||||
}
|
||||
// factorioContainer "snek" {
|
||||
autosave-interval = 20;
|
||||
admins = [ "jonay2000" "computerdruid" "pineapple" ];
|
||||
extraSettingsFile = config.sops.secrets.factorio.path;
|
||||
mods = getMods ../../factorio-mods/snek;
|
||||
package = factorioVersion "2.0.66" "sha256-8bOXbqzE4jOADTmdkABsNW+jZvXWQ0HFBMlcDLoyHAY=";
|
||||
port = 20002;
|
||||
};
|
||||
containers =
|
||||
factorioContainer "tawney"
|
||||
{
|
||||
autosave-interval = 20;
|
||||
admins = [
|
||||
"jonay2000"
|
||||
"computerdruid"
|
||||
"pineapple"
|
||||
];
|
||||
extraSettingsFile = config.sops.secrets.factorio.path;
|
||||
# mods = getMods ../../factorio-mods/tawney;
|
||||
package = factorioVersion "2.0.69" "sha256-I1FHuz7WtfCmmTiTxskv3+U1upWrhmBG9R+GUoS1c0E=";
|
||||
port = 20001;
|
||||
}
|
||||
// factorioContainer "snek" {
|
||||
autosave-interval = 20;
|
||||
admins = [
|
||||
"jonay2000"
|
||||
"computerdruid"
|
||||
"pineapple"
|
||||
"koragendum"
|
||||
];
|
||||
extraSettingsFile = config.sops.secrets.factorio.path;
|
||||
mods = getMods ../../factorio-mods/snek;
|
||||
package = factorioVersion "2.0.69" "sha256-I1FHuz7WtfCmmTiTxskv3+U1upWrhmBG9R+GUoS1c0E=";
|
||||
port = 20002;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,6 +68,15 @@ in
|
|||
SHOW_REGISTRATION_BUTTON = false;
|
||||
ENABLE_PASSWORD_SIGNIN_FORM = false;
|
||||
};
|
||||
openid = {
|
||||
ENABLE_OPENID_SIGNUP = true;
|
||||
};
|
||||
oauth2_client = {
|
||||
REGISTER_EMAIL_CONFIRM = false;
|
||||
ENABLE_AUTO_REGISTRATION = true;
|
||||
UPDATE_AVATAR = true;
|
||||
ACCOUNT_LINKING = "auto";
|
||||
};
|
||||
actions = {
|
||||
ENABLED = true;
|
||||
DEFAULT_ACTIONS_URL = "github";
|
||||
|
|
@ -150,5 +159,4 @@ in
|
|||
};
|
||||
};
|
||||
networking.firewall.trustedInterfaces = [ "br-+" ];
|
||||
|
||||
}
|
||||
|
|
|
|||
14
fili/services/websites/compiler-construction-2021.nix
Normal file
14
fili/services/websites/compiler-construction-2021.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, flakes, ... }:
|
||||
{
|
||||
services.nginx = {
|
||||
virtualHosts."compiler-construction-2021.donsz.nl" = {
|
||||
forceSSL = true;
|
||||
http2 = true;
|
||||
enableACME = true;
|
||||
|
||||
locations."/" = {
|
||||
root = flakes.compiler-construction-2021.packages.${pkgs.system}.website;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -5,5 +5,7 @@ _: {
|
|||
./totpal.nix
|
||||
./harmonica-tabs.nix
|
||||
./mapf.nix
|
||||
./compiler-construction-2021.nix
|
||||
./mapfm-poster.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
26
fili/services/websites/mapfm-poster.nix
Normal file
26
fili/services/websites/mapfm-poster.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."mapfm-poster.donsz.nl" = {
|
||||
forceSSL = true;
|
||||
http2 = true;
|
||||
enableACME = true;
|
||||
|
||||
locations."/" = {
|
||||
root = pkgs.stdenv.mkDerivation rec {
|
||||
pname = "research-project-poster";
|
||||
version = "2021-06-27";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "jdonszelmann";
|
||||
repo = "research-project";
|
||||
rev = "f1c0c5d839197f825b555780271781281ba10ac3";
|
||||
sha256 = "sha256-YJxcLRABU3yRS/U/XNLpTIXtve0cFfnwPKr+1oY0HeY=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r assets/final_poster/* $out
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue