nixos-config/machines/factorio/configuration.nix

105 lines
1.8 KiB
Nix
Raw Normal View History

2024-11-12 20:11:52 +01:00
{
self,
...
}:
{
modulesPath,
config,
...
}:
{
imports = [
(modulesPath + "/virtualisation/lxc-container.nix")
../../users/root
../../users/erwin
];
eboskma = {
users.erwin = {
enable = true;
server = true;
};
nix-common = {
enable = true;
remote-builders = true;
};
rust-motd.enable = true;
tailscale.enable = true;
};
boot = {
isContainer = true;
};
time.timeZone = "Europe/Amsterdam";
system.configurationRevision = self.inputs.nixpkgs.lib.mkIf (self ? rev) self.rev;
networking = {
hostName = "read";
useDHCP = false;
useHostResolvConf = false;
networkmanager.enable = false;
useNetworkd = true;
nftables.enable = true;
firewall.trustedInterfaces = [ "tailscale0" ];
};
systemd = {
services.logrotate-checkconf.enable = false;
network = {
enable = true;
wait-online.anyInterface = true;
networks = {
"40-eth0" = {
matchConfig = {
Name = "eth0";
};
networkConfig = {
Address = "10.0.0.208/24";
Gateway = "10.0.0.1";
DNS = "10.0.0.206";
DHCP = "no";
};
};
};
};
};
security = {
sudo-rs = {
enable = true;
execWheelOnly = true;
wheelNeedsPassword = false;
};
sudo.enable = false;
};
services = {
factorio = {
enable = true;
game-name = "Blocks";
description = "It's cityblocks";
lan = true;
openFirewall = true;
saveName = "Blocks";
admins = [ "eboskma" ];
allowedPlayers = [ "eboskma" ];
extraSettingsFile = config.sops.secrets.factorio-config.path;
};
};
sops.defaultSopsFile = ./secrets.yaml;
sops.secrets = {
factorio-config = { };
};
system.stateVersion = "24.11";
}