Compare commits

...

13 commits

Author SHA1 Message Date
dfe51e396b
Remove factorio container 2024-11-12 21:22:54 +01:00
d88f956885
factorio: Remove allowedPlayers 2024-11-12 21:13:04 +01:00
9dd2e5f1d1
factorio: Don't require user verification, it's a LAN game 2024-11-12 21:05:02 +01:00
60578c5ad0
factorio: Set secrets owner 2024-11-12 20:48:25 +01:00
d96bf4f608
factorio: Use tailscale for deploy 2024-11-12 20:34:21 +01:00
f594c911b4
factorio: Update settings 2024-11-12 20:31:03 +01:00
7bf0c89a8f
factorio: Set correct hostname 2024-11-12 20:23:38 +01:00
4800ae998d
factorio: init container 2024-11-12 20:11:52 +01:00
aad8139fdc
Update factorio download script to accept optional edition argument.
Possible values:
- alpha (default): The base game
- headless: For server use
- demo: The Factorio Demo
- expansion: Factorio: Space Age expansion
2024-11-12 15:00:14 +01:00
22111b5dc7
home: Remove orca-slicer 2024-11-11 08:49:58 +01:00
e51b8263ce
factorio: Update stable to 2.0.15 2024-11-11 08:49:47 +01:00
863ae3b400
read: Remove comin, move rust-motd to module 2024-11-11 08:47:51 +01:00
b6785cff54
flake.lock: Update
Flake lock file updates:

• Updated input 'anyrun':
    'github:Kirottu/anyrun/b3b4f2253d43af3311b3d3fc86973fc3e9559c33?narHash=sha256-i3FxeHjsHw4AePx3AWVVywy92EEobx/ZER4ignWxNrE%3D' (2024-11-01)
  → 'github:Kirottu/anyrun/d2017f224b2bfd7e33573c7070e7c3e2960c7dcc?narHash=sha256-L1hLXf4IDZ0KoXbFiSNNZJ7IrReEr/J%2BCLt6Rl4Ea3M%3D' (2024-11-08)
• Updated input 'colmena':
    'github:zhaofengli/colmena/03f1a18a6fba9ad9c4edb1cc7cf394390c304198?narHash=sha256-N8gaV5bngMQPGyuo/RVdEsHTXvOeqjUhhxXpGea12DE%3D' (2024-11-08)
  → 'github:zhaofengli/colmena/a2193487bcf70bbb998ad1a25a4ff02b8d55db7a?narHash=sha256-04iOZoJ0D%2By3xhZtaCgSBOz8T4hED7oMVkuAOzXT8vU%3D' (2024-11-10)
• Updated input 'disko':
    'github:nix-community/disko/a8bdb16b473f457609eb76d0dabb2fcb4e1f64b8?narHash=sha256-INZxHLoqy7uTLuMhEEnYkyMgouXvJtBupup2pOpcM%2Bs%3D' (2024-11-08)
  → 'github:nix-community/disko/486250f404f4a4f4f33f8f669d83ca5f6e6b7dfc?narHash=sha256-cZ0QMpv5p2a6WEE%2Bo9uu0a4ma6RzQDOQTbm7PbixWz8%3D' (2024-11-10)
• Updated input 'emacs-overlay':
    'github:nix-community/emacs-overlay/2313c4189eaef014d01fb260313f58554ddb5e31?narHash=sha256-/E0UgOD6LnDfJPqCwqa1WVEgwDQ6NXXH%2BWq89cMUris%3D' (2024-11-08)
  → 'github:nix-community/emacs-overlay/e94b9aef9633ffb9ea2bebe8c9b999618ec15109?narHash=sha256-E8Caw6l/73iVFEYGch8Yc31fXCtSY30xxb%2BCsTN1gG0%3D' (2024-11-11)
• Updated input 'emacs-overlay/nixpkgs-stable':
    'github:NixOS/nixpkgs/dba414932936fde69f0606b4f1d87c5bc0003ede?narHash=sha256-mwrFF0vElHJP8X3pFCByJR365Q2463ATp2qGIrDUdlE%3D' (2024-11-06)
  → 'github:NixOS/nixpkgs/83fb6c028368e465cd19bb127b86f971a5e41ebc?narHash=sha256-rz30HrFYCHiWEBCKHMffHbMdWJ35hEkcRVU0h7ms3x0%3D' (2024-11-07)
• Updated input 'home-manager':
    'github:nix-community/home-manager/2f607e07f3ac7e53541120536708e824acccfaa8?narHash=sha256-0kZL4m%2BbKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc%3D' (2024-11-05)
  → 'github:nix-community/home-manager/60bb110917844d354f3c18e05450606a435d2d10?narHash=sha256-NjavpgE9/bMe/ABvZpyHIUeYF1mqR5lhaep3wB79ucs%3D' (2024-11-10)
• Updated input 'microvm':
    'github:astro/microvm.nix/93122446d6001f9789d05e565f73bebfa3f53b50?narHash=sha256-RxV89z3TwhQT0Wue42aSPh3O7hXGbAFYHHNSnW9h6P8%3D' (2024-11-01)
  → 'github:astro/microvm.nix/dd89404e1885b8d7033106f3898eaef8db660cb2?narHash=sha256-HYu%2BbPoV3UILhwc4Ar5iQ7aF%2BDuQWHXl4mljN6Bwq6A%3D' (2024-11-10)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/4aa36568d413aca0ea84a1684d2d46f55dbabad7?narHash=sha256-Zwl8YgTVJTEum%2BL%2B0zVAWvXAGbWAuXHax3KzuejaDyo%3D' (2024-11-05)
  → 'github:nixos/nixpkgs/76612b17c0ce71689921ca12d9ffdc9c23ce40b2?narHash=sha256-IigrKK3vYRpUu%2BHEjPL/phrfh7Ox881er1UEsZvw9Q4%3D' (2024-11-09)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/d52f2a4c103a0acf09ded857b9e2519ae2360e59?narHash=sha256-dQSyYPmrQiPr%2BPGEd%2BK8038rubFGz7G/dNXVeaGWE0w%3D' (2024-11-08)
  → 'github:oxalica/rust-overlay/7c4cd99ed7604b79e8cb721099ac99c66f656b3a?narHash=sha256-fYVoUUtSadbOrH0z0epVQDsStBDS/S/fAK//0ECQAAI%3D' (2024-11-11)
• Updated input 'sops':
    'github:Mic92/sops-nix/60e1bce1999f126e3b16ef45f89f72f0c3f8d16f?narHash=sha256-iyp51lPWEQz4c5VH9bVbAuBcFP4crETU2QJYh5V0NYA%3D' (2024-11-08)
  → 'github:Mic92/sops-nix/f1675e3b0e1e663a4af49be67ecbc9e749f85eb7?narHash=sha256-jR8i6nFLmSmm0cIoeRQ8Q4EBARa3oGaAtEER/OMMxus%3D' (2024-11-10)
2024-11-11 08:26:07 +01:00
6 changed files with 133 additions and 102 deletions

View file

@ -9,11 +9,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1730444665,
"narHash": "sha256-i3FxeHjsHw4AePx3AWVVywy92EEobx/ZER4ignWxNrE=",
"lastModified": 1731092955,
"narHash": "sha256-L1hLXf4IDZ0KoXbFiSNNZJ7IrReEr/J+CLt6Rl4Ea3M=",
"owner": "Kirottu",
"repo": "anyrun",
"rev": "b3b4f2253d43af3311b3d3fc86973fc3e9559c33",
"rev": "d2017f224b2bfd7e33573c7070e7c3e2960c7dcc",
"type": "github"
},
"original": {
@ -59,11 +59,11 @@
"stable": "stable"
},
"locked": {
"lastModified": 1731037643,
"narHash": "sha256-N8gaV5bngMQPGyuo/RVdEsHTXvOeqjUhhxXpGea12DE=",
"lastModified": 1731249827,
"narHash": "sha256-04iOZoJ0D+y3xhZtaCgSBOz8T4hED7oMVkuAOzXT8vU=",
"owner": "zhaofengli",
"repo": "colmena",
"rev": "03f1a18a6fba9ad9c4edb1cc7cf394390c304198",
"rev": "a2193487bcf70bbb998ad1a25a4ff02b8d55db7a",
"type": "github"
},
"original": {
@ -150,11 +150,11 @@
]
},
"locked": {
"lastModified": 1731051511,
"narHash": "sha256-INZxHLoqy7uTLuMhEEnYkyMgouXvJtBupup2pOpcM+s=",
"lastModified": 1731274291,
"narHash": "sha256-cZ0QMpv5p2a6WEE+o9uu0a4ma6RzQDOQTbm7PbixWz8=",
"owner": "nix-community",
"repo": "disko",
"rev": "a8bdb16b473f457609eb76d0dabb2fcb4e1f64b8",
"rev": "486250f404f4a4f4f33f8f669d83ca5f6e6b7dfc",
"type": "github"
},
"original": {
@ -171,11 +171,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1731057136,
"narHash": "sha256-/E0UgOD6LnDfJPqCwqa1WVEgwDQ6NXXH+Wq89cMUris=",
"lastModified": 1731290007,
"narHash": "sha256-E8Caw6l/73iVFEYGch8Yc31fXCtSY30xxb+CsTN1gG0=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "2313c4189eaef014d01fb260313f58554ddb5e31",
"rev": "e94b9aef9633ffb9ea2bebe8c9b999618ec15109",
"type": "github"
},
"original": {
@ -403,11 +403,11 @@
]
},
"locked": {
"lastModified": 1730837930,
"narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=",
"lastModified": 1731235328,
"narHash": "sha256-NjavpgE9/bMe/ABvZpyHIUeYF1mqR5lhaep3wB79ucs=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2f607e07f3ac7e53541120536708e824acccfaa8",
"rev": "60bb110917844d354f3c18e05450606a435d2d10",
"type": "github"
},
"original": {
@ -427,11 +427,11 @@
"spectrum": "spectrum"
},
"locked": {
"lastModified": 1730499294,
"narHash": "sha256-RxV89z3TwhQT0Wue42aSPh3O7hXGbAFYHHNSnW9h6P8=",
"lastModified": 1731240174,
"narHash": "sha256-HYu+bPoV3UILhwc4Ar5iQ7aF+DuQWHXl4mljN6Bwq6A=",
"owner": "astro",
"repo": "microvm.nix",
"rev": "93122446d6001f9789d05e565f73bebfa3f53b50",
"rev": "dd89404e1885b8d7033106f3898eaef8db660cb2",
"type": "github"
},
"original": {
@ -539,11 +539,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1730785428,
"narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=",
"lastModified": 1731139594,
"narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7",
"rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2",
"type": "github"
},
"original": {
@ -567,11 +567,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1730883749,
"narHash": "sha256-mwrFF0vElHJP8X3pFCByJR365Q2463ATp2qGIrDUdlE=",
"lastModified": 1730963269,
"narHash": "sha256-rz30HrFYCHiWEBCKHMffHbMdWJ35hEkcRVU0h7ms3x0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dba414932936fde69f0606b4f1d87c5bc0003ede",
"rev": "83fb6c028368e465cd19bb127b86f971a5e41ebc",
"type": "github"
},
"original": {
@ -697,11 +697,11 @@
]
},
"locked": {
"lastModified": 1731032894,
"narHash": "sha256-dQSyYPmrQiPr+PGEd+K8038rubFGz7G/dNXVeaGWE0w=",
"lastModified": 1731292155,
"narHash": "sha256-fYVoUUtSadbOrH0z0epVQDsStBDS/S/fAK//0ECQAAI=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "d52f2a4c103a0acf09ded857b9e2519ae2360e59",
"rev": "7c4cd99ed7604b79e8cb721099ac99c66f656b3a",
"type": "github"
},
"original": {
@ -718,11 +718,11 @@
"nixpkgs-stable": "nixpkgs-stable_3"
},
"locked": {
"lastModified": 1731047660,
"narHash": "sha256-iyp51lPWEQz4c5VH9bVbAuBcFP4crETU2QJYh5V0NYA=",
"lastModified": 1731213149,
"narHash": "sha256-jR8i6nFLmSmm0cIoeRQ8Q4EBARa3oGaAtEER/OMMxus=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "60e1bce1999f126e3b16ef45f89f72f0c3f8d16f",
"rev": "f1675e3b0e1e663a4af49be67ecbc9e749f85eb7",
"type": "github"
},
"original": {

View file

@ -1,6 +1,5 @@
{
self,
comin,
caddy-with-plugins,
...
}:
@ -14,8 +13,6 @@
imports = [
(modulesPath + "/virtualisation/lxc-container.nix")
comin.nixosModules.comin
../../users/root
../../users/erwin
@ -42,6 +39,7 @@
}
];
};
rust-motd.enable = true;
tailscale.enable = true;
};
@ -68,16 +66,6 @@
firewall.trustedInterfaces = [ "tailscale0" ];
};
services.comin = {
enable = true;
remotes = [
{
name = "origin";
url = "https://git.datarift.nl/erwin/nixos-config";
}
];
};
systemd = {
services.logrotate-checkconf.enable = false;
@ -112,28 +100,6 @@
sudo.enable = false;
};
programs.rust-motd = {
enable = true;
settings = {
banner = {
color = "red";
command = "${pkgs.figlet}/bin/figlet -f slant ${config.networking.hostName}";
};
weather = {
loc = "De%20Westereen,%20Netherlands";
};
uptime = {
prefix = "up: ";
};
filesystems = {
root = "/";
};
memory = {
swap_pos = "none";
};
};
};
sops.defaultSopsFile = ./secrets.yaml;
sops.secrets = {
caddy-env = { };

View file

@ -0,0 +1,40 @@
{
pkgs,
config,
lib,
...
}:
with lib;
let
cfg = config.eboskma.rust-motd;
in
{
options.eboskma.rust-motd = {
enable = mkEnableOption "rust-motd";
};
config = mkIf cfg.enable {
programs.rust-motd = {
enable = true;
settings = {
banner = {
color = "red";
command = "${pkgs.figlet}/bin/figlet -f slant ${config.networking.hostName}";
};
weather = {
loc = "De%20Westereen,%20Netherlands";
};
uptime = {
prefix = "up: ";
};
filesystems = {
root = "/";
};
memory = {
swap_pos = "none";
};
};
};
};
}

View file

@ -3,25 +3,25 @@
"alpha": {
"experimental": {
"candidateHashFilenames": [
"factorio_linux_2.0.14.tar.xz"
"factorio_linux_2.0.16.tar.xz"
],
"name": "factorio_alpha_x64-2.0.14.tar.xz",
"name": "factorio_alpha_x64-2.0.16.tar.xz",
"needsAuth": true,
"sha256": "8853ce1cdea0c142f78c3ebb3b7d51420f9eb28e9113f2be08a12d4e476dcadc",
"sha256": "9828ae257a3b2f95de2dae2f262e9d8d6b85f356911449166ceef1472d231e6d",
"tarDirectory": "x64",
"url": "https://factorio.com/get-download/2.0.14/alpha/linux64",
"version": "2.0.14"
"url": "https://factorio.com/get-download/2.0.16/alpha/linux64",
"version": "2.0.16"
},
"stable": {
"candidateHashFilenames": [
"factorio_linux_2.0.14.tar.xz"
"factorio_linux_2.0.15.tar.xz"
],
"name": "factorio_alpha_x64-2.0.14.tar.xz",
"name": "factorio_alpha_x64-2.0.15.tar.xz",
"needsAuth": true,
"sha256": "8853ce1cdea0c142f78c3ebb3b7d51420f9eb28e9113f2be08a12d4e476dcadc",
"sha256": "39df353fe8f14394d2618b9627659f3c0c16922362708e681f006083a8f5163e",
"tarDirectory": "x64",
"url": "https://factorio.com/get-download/2.0.14/alpha/linux64",
"version": "2.0.14"
"url": "https://factorio.com/get-download/2.0.15/alpha/linux64",
"version": "2.0.15"
}
},
"demo": {
@ -51,51 +51,51 @@
"expansion": {
"experimental": {
"candidateHashFilenames": [
"factorio-space-age_linux_2.0.14.tar.xz"
"factorio-space-age_linux_2.0.16.tar.xz"
],
"name": "factorio_expansion_x64-2.0.14.tar.xz",
"name": "factorio_expansion_x64-2.0.16.tar.xz",
"needsAuth": true,
"sha256": "7878444d65dc12815d7ce4d2c941441b8b7e05605e3f0bd69d45d02b3aa8f81a",
"sha256": "32ae1b8f525148b3bb1f68e41b398543c2b0da29734f9f3b4f9509a86c64ecf4",
"tarDirectory": "x64",
"url": "https://factorio.com/get-download/2.0.14/expansion/linux64",
"version": "2.0.14"
"url": "https://factorio.com/get-download/2.0.16/expansion/linux64",
"version": "2.0.16"
},
"stable": {
"candidateHashFilenames": [
"factorio-space-age_linux_2.0.14.tar.xz"
"factorio-space-age_linux_2.0.15.tar.xz"
],
"name": "factorio_expansion_x64-2.0.14.tar.xz",
"name": "factorio_expansion_x64-2.0.15.tar.xz",
"needsAuth": true,
"sha256": "7878444d65dc12815d7ce4d2c941441b8b7e05605e3f0bd69d45d02b3aa8f81a",
"sha256": "09de33402fee3dbae9d0207409f05a19e2fa8019b53d3de96557d2ec904e10f3",
"tarDirectory": "x64",
"url": "https://factorio.com/get-download/2.0.14/expansion/linux64",
"version": "2.0.14"
"url": "https://factorio.com/get-download/2.0.15/expansion/linux64",
"version": "2.0.15"
}
},
"headless": {
"experimental": {
"candidateHashFilenames": [
"factorio-headless_linux_2.0.14.tar.xz",
"factorio_headless_x64_2.0.14.tar.xz"
"factorio-headless_linux_2.0.16.tar.xz",
"factorio_headless_x64_2.0.16.tar.xz"
],
"name": "factorio_headless_x64-2.0.14.tar.xz",
"name": "factorio_headless_x64-2.0.16.tar.xz",
"needsAuth": false,
"sha256": "5a4bc4c3b2a97ed1fc58eb796321e848dcc64435bd91013dd9c78a14a8ce8815",
"sha256": "f2069b4b746500d945eeb67ef7eda5e7aebe7fd0294c2af4e117af22a3bbaea3",
"tarDirectory": "x64",
"url": "https://factorio.com/get-download/2.0.14/headless/linux64",
"version": "2.0.14"
"url": "https://factorio.com/get-download/2.0.16/headless/linux64",
"version": "2.0.16"
},
"stable": {
"candidateHashFilenames": [
"factorio-headless_linux_2.0.14.tar.xz",
"factorio_headless_x64_2.0.14.tar.xz"
"factorio-headless_linux_2.0.15.tar.xz",
"factorio_headless_x64_2.0.15.tar.xz"
],
"name": "factorio_headless_x64-2.0.14.tar.xz",
"name": "factorio_headless_x64-2.0.15.tar.xz",
"needsAuth": false,
"sha256": "5a4bc4c3b2a97ed1fc58eb796321e848dcc64435bd91013dd9c78a14a8ce8815",
"sha256": "70b441cb807811a60586c01107248c1d8d7ae043bd1f23675fc924fbaaa538d8",
"tarDirectory": "x64",
"url": "https://factorio.com/get-download/2.0.14/headless/linux64",
"version": "2.0.14"
"url": "https://factorio.com/get-download/2.0.15/headless/linux64",
"version": "2.0.15"
}
}
}

View file

@ -0,0 +1,15 @@
# shellcheck shell=bash
edition=alpha
if [[ $# -ge 1 ]]; then
edition="${1}"
fi
releases_file=$(mktemp --suffix=.json)
xhs -o "${releases_file}" factorio.com/api/latest-releases
version=$(jaq -r '.stable.alpha' "${releases_file}")
token=$(cat "${FACTORIO_TOKEN_FILE:?}")
nix-prefetch-url --name "factorio_${edition}_x64-${version}.tar.xz" \
"https://factorio.com/get-download/${version}/${edition}/linux64?username=eboskma&token=${token}"

View file

@ -11,10 +11,21 @@ let
homeCfg = config.home-manager.users.erwin;
bt = config.eboskma.bluetooth;
downloadFactorio = pkgs.writeShellScriptBin "download-factorio" ''
version=$(${pkgs.xh}/bin/xhs factorio.com/api/latest-releases | ${pkgs.jaq}/bin/jaq -r '.stable.alpha')
${pkgs.nix}/bin/nix-prefetch-url --name factorio_alpha_x64-''${version}.tar.xz https://factorio.com/get-download/''${version}/alpha/linux64\?username=eboskma\&token=$(cat ${config.sops.secrets.factorio-token.path})
'';
downloadFactorio = pkgs.writeShellApplication {
name = "download-factorio";
text = builtins.readFile ./download-factorio.sh;
runtimeInputs = with pkgs; [
jaq
nix
xh
];
runtimeEnv = {
FACTORIO_TOKEN_FILE = config.sops.secrets.factorio-token.path;
};
derivationArgs = {
version = "0.0.1";
};
};
in
{
config = mkIf cfg.home {
@ -240,7 +251,6 @@ in
(noson.overrideAttrs (_: {
qtWrapperArgs = "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ pkgs.libpulseaudio ]}";
}))
orca-slicer
pamedia
pass
passmark-performancetest