chore: Drop glados and update 2a-emulator
This commit is contained in:
parent
f36c07c90a
commit
a438c7bf60
808
flake.lock
808
flake.lock
File diff suppressed because it is too large
Load diff
|
@ -15,7 +15,7 @@
|
||||||
url = "github:nix-community/nixpkgs-wayland";
|
url = "github:nix-community/nixpkgs-wayland";
|
||||||
};
|
};
|
||||||
emulator-2a = {
|
emulator-2a = {
|
||||||
url = "github:MalteT/2a-emulator/develop";
|
url = "github:MalteT/2a-emulator/main";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
mensa = {
|
mensa = {
|
||||||
|
@ -34,10 +34,6 @@
|
||||||
url = "github:Mic92/sops-nix";
|
url = "github:Mic92/sops-nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
glados = {
|
|
||||||
url = "git+http://git.home/megamanmalte/GLaDOS?ref=main";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
@ -216,8 +212,6 @@
|
||||||
./hosts/cornu-aspersum.nix
|
./hosts/cornu-aspersum.nix
|
||||||
./hardware/netcup-rs-2000-g9.nix
|
./hardware/netcup-rs-2000-g9.nix
|
||||||
./modules/nginx-reverse-proxy.nix
|
./modules/nginx-reverse-proxy.nix
|
||||||
./modules/ccqcraft.nix
|
|
||||||
inputs.glados.nixosModules.glados
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
granodomus-lima = {...}: {
|
granodomus-lima = {...}: {
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
{
|
{pkgs, ...}: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
boot.loader.grub.version = 2;
|
boot.loader.grub.version = 2;
|
||||||
boot.loader.grub.device = "/dev/sda";
|
boot.loader.grub.device = "/dev/sda";
|
||||||
|
@ -22,36 +18,9 @@
|
||||||
sops.defaultSopsFile = ../secrets/hosts/cornu-aspersum/secrets.yaml;
|
sops.defaultSopsFile = ../secrets/hosts/cornu-aspersum/secrets.yaml;
|
||||||
sops.age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
sops.age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
||||||
|
|
||||||
sops.secrets.gladosEnv = {};
|
|
||||||
services.glados = {
|
|
||||||
enable = true;
|
|
||||||
dataCollector.enable = true;
|
|
||||||
envFile = config.sops.secrets.gladosEnv.path;
|
|
||||||
};
|
|
||||||
|
|
||||||
# === Run grafana, mainly for ccqcraft.de ===
|
|
||||||
services.grafana = {
|
|
||||||
enable = true;
|
|
||||||
domain = "data.ccqcraft.de";
|
|
||||||
port = 2342;
|
|
||||||
addr = "127.0.0.1";
|
|
||||||
auth.anonymous.enable = false;
|
|
||||||
};
|
|
||||||
services.nginx.virtualHosts.${config.services.grafana.settings.server.domain} = {
|
|
||||||
enableACME = true;
|
|
||||||
forceSSL = true;
|
|
||||||
serverAliases = ["data.tammena.rocks"];
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://127.0.0.1:${toString config.services.grafana.settings.server.http_port}";
|
|
||||||
proxyWebsockets = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Run radicale with infcloud interface for me and Marie
|
# Run radicale with infcloud interface for me and Marie
|
||||||
services.radicaleWithInfcloud.enable = true;
|
services.radicaleWithInfcloud.enable = true;
|
||||||
|
|
||||||
systemd.services.glados.serviceConfig.SupplementaryGroups = [config.users.groups.keys.name];
|
|
||||||
|
|
||||||
services.qemuGuest.enable = true;
|
services.qemuGuest.enable = true;
|
||||||
|
|
||||||
services.bind = {
|
services.bind = {
|
||||||
|
|
|
@ -1,66 +0,0 @@
|
||||||
{pkgs, ...}: let
|
|
||||||
user = "ccqcraft";
|
|
||||||
host = "ccqcraft.de";
|
|
||||||
path = "~/server/mc/plugins/EasyBackup/backups";
|
|
||||||
|
|
||||||
fetchTime = "*-*-* 03:00:00";
|
|
||||||
clearTime = "Mon *-*-* 04:00:00";
|
|
||||||
|
|
||||||
insertResetNoteCmd = with pkgs;
|
|
||||||
pkgs.writeScriptBin "insert-reset-note" ''
|
|
||||||
#!${stdenv.shell}
|
|
||||||
DATE=$(${coreutils}/bin/date +backup_%Y-%m-%d_%H:%M:%S%z.reset)
|
|
||||||
touch ./''${DATE}
|
|
||||||
'';
|
|
||||||
in {
|
|
||||||
systemd.services = {
|
|
||||||
ccqcraft-pull-backups = {
|
|
||||||
unitConfig = {
|
|
||||||
Description = ''
|
|
||||||
Pull backups from CCQCraft Minecraft Server via rsync
|
|
||||||
'';
|
|
||||||
After = ["network.target"];
|
|
||||||
};
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
ExecStart = [
|
|
||||||
''
|
|
||||||
${pkgs.rsync}/bin/rsync -tr --partial --rsh=${pkgs.openssh}/bin/ssh "${user}@${host}:${path}/" .''
|
|
||||||
];
|
|
||||||
WorkingDirectory = "/srv/hnd/ccqcraft-backups";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
ccqcraft-restart-incremental-backups = {
|
|
||||||
unitConfig = {
|
|
||||||
Description = ''
|
|
||||||
Restart incremental backups for CCQCraft server
|
|
||||||
'';
|
|
||||||
Requires = ["ccqcraft-pull-backups.service"];
|
|
||||||
After = ["network.target" "ccqcraft-pull-backups.service"];
|
|
||||||
};
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
WorkingDirectory = "/srv/hnd/ccqcraft-backups";
|
|
||||||
ExecStart = [''${pkgs.openssh}/bin/ssh "${user}@${host}" rm ${path}/*''];
|
|
||||||
ExecStartPost = ["${insertResetNoteCmd}/bin/insert-reset-note"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.timers = {
|
|
||||||
ccqcraft-pull-backups = {
|
|
||||||
wantedBy = ["timers.target"];
|
|
||||||
unitConfig = {Description = "Run CCQCraft Backups every day";};
|
|
||||||
timerConfig = {OnCalendar = fetchTime;};
|
|
||||||
};
|
|
||||||
|
|
||||||
ccqcraft-restart-incremental-backups = {
|
|
||||||
wantedBy = ["timers.target"];
|
|
||||||
unitConfig = {
|
|
||||||
Description = "Restart CCQCraft incremental backups weekly";
|
|
||||||
};
|
|
||||||
timerConfig = {OnCalendar = clearTime;};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,47 +0,0 @@
|
||||||
{pkgs, ...}: let
|
|
||||||
ports = {
|
|
||||||
minecraft = 25565;
|
|
||||||
rcon = 24738;
|
|
||||||
voicechat = 24454;
|
|
||||||
dynmap = 8123;
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
|
|
||||||
users.users.ccqcraft = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = ["docker"];
|
|
||||||
hashedPassword = "$6$D69mzkGZAitfCQOL$oL/7SmSqGwRhZgyiOEgp6N5NkZ/NpdzggomtPFa4XB33Kb3aZMBiLWQS3VSHZhRo2y9mPgXy3mFPSvtvCzoKz/";
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
git
|
|
||||||
docker-compose
|
|
||||||
megatools
|
|
||||||
unzip
|
|
||||||
];
|
|
||||||
|
|
||||||
networking.firewall = {
|
|
||||||
allowedTCPPorts = [ports.minecraft ports.rcon];
|
|
||||||
allowedUDPPorts = [
|
|
||||||
# Port used for Voicechat plugin
|
|
||||||
ports.voicechat
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Expose dynmap map through nginx
|
|
||||||
services.nginx.virtualHosts."map.ccqcraft.de" = {
|
|
||||||
serverAliases = ["ccqcraft.de"];
|
|
||||||
enableACME = true;
|
|
||||||
forceSSL = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://[::1]:${builtins.toString ports.dynmap}";
|
|
||||||
#proxyWebsockets = true; # needed if you need to use WebSocket
|
|
||||||
#extraConfig =
|
|
||||||
# required when the target is also TLS server with multiple hosts
|
|
||||||
#"proxy_ssl_server_name on;" +
|
|
||||||
# required when the server wants to use HTTP Authentication
|
|
||||||
#"proxy_pass_header Authorization;";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,5 +1,4 @@
|
||||||
radicale-htpasswd: ENC[AES256_GCM,data:8AfEvYYvPjgthdxVGOQ4CzxhKtkRZHNFutWgmkXk9AMBfJi1DWr+dGj6ZqbnK7jteZ9Tnq6aZGEOkpKoVAV+tN/N,iv:6fCsTira+tiZagXPf+vqTr8lOqJmIKgRJ86RQHedReo=,tag:GHo/v9lGLmZtvm2311Qfqw==,type:str]
|
radicale-htpasswd: ENC[AES256_GCM,data:8AfEvYYvPjgthdxVGOQ4CzxhKtkRZHNFutWgmkXk9AMBfJi1DWr+dGj6ZqbnK7jteZ9Tnq6aZGEOkpKoVAV+tN/N,iv:6fCsTira+tiZagXPf+vqTr8lOqJmIKgRJ86RQHedReo=,tag:GHo/v9lGLmZtvm2311Qfqw==,type:str]
|
||||||
gladosEnv: ENC[AES256_GCM,data:EXUbwXX9fM4OcLoWaXAVgnpT8WDXJ5Fl8JjbXagL2ThsObsO0/v5s15X6XapIMRD1Tdf9pAkhzd8KgsxgljcaRCu1VlmI289rptys9u5Ajn6ZMFfoTdRcM8u5nM2VEKBrK+Zov4TQpNBZdU+W44KnIwnr/bH3GPHkzUvMJxT2qu/a20Cp+Kxp+FDPUp8FZDWVT7iuLEtwwqy9oCQG2vFCUTbgMo9lyh40bG6eObkiKZ2UhaAo1p0shH/SgHMIWY++psynH4HtJX6sqR37sa7PTsa2SQZ6+WYWrbx55ud1fIVuHhFoAhny1GT7DOavGmd856xIF53XqSnbTiUJwdUoL568rhsUGGMg+LZTfSNUMhxIKLELsGBX86HNQHWjyQPq6oUS0JSHBBPx+Qyd9ie1whVC+PwxVMatD8Ull7S9LyFtJzU+buG4Ey+Uk7XRNU0hE0hGVysHFu7TqzIHNLvaVnYIonL349vsUUv8cO+k9VVVyBcist6YZV1nOB5InXoVe6Kh0XyWs9BtCKBPcKRGCwGybi3/EPQEWhMYZF/paKFl0/DIw93QUDbOnxJOHvebVy02iWVqGA=,iv:JmNRE6CBHOROyUSJ0h0XlXJ6aW/3mOj7IHgbTDAsS30=,tag:EcQ23XGYPjDDNxIAYUL33w==,type:str]
|
|
||||||
sops:
|
sops:
|
||||||
kms: []
|
kms: []
|
||||||
gcp_kms: []
|
gcp_kms: []
|
||||||
|
@ -15,8 +14,8 @@ sops:
|
||||||
WlMwS0J4WGhIL2tDcW5HMWhIdU1jVVEKEYC4OhrpqzyGiGvjkk61wY36T+AP9RjY
|
WlMwS0J4WGhIL2tDcW5HMWhIdU1jVVEKEYC4OhrpqzyGiGvjkk61wY36T+AP9RjY
|
||||||
5Y64AY9c1cq23np0uUUoSdYL91gV1XmNX+0bwTZpiXASHJx0uZQwHA==
|
5Y64AY9c1cq23np0uUUoSdYL91gV1XmNX+0bwTZpiXASHJx0uZQwHA==
|
||||||
-----END AGE ENCRYPTED FILE-----
|
-----END AGE ENCRYPTED FILE-----
|
||||||
lastmodified: "2022-01-14T13:47:25Z"
|
lastmodified: "2023-04-14T21:46:27Z"
|
||||||
mac: ENC[AES256_GCM,data:sZdNGaK/yO4Q9rEa+8U5U/mWKXU+/dHlvFpur0LvCtiVbQ79QEOcnJu3BAbiBj+Jda8j2ClI6HaivP12MVh0a0KpaaaE+tAO6WMhoF6TXLCCmR/1h8o8NoUwp21hzaLjCt0y8ckWXWAU9NMPc2siKA74sGEP9ORbOjnBvLGHLJM=,iv:OwbN3OsSunJib11bZN6CQ/vej75j4bPGxQtzasv9Y78=,tag:RZvr0JbTDdfESPR8XyJIHQ==,type:str]
|
mac: ENC[AES256_GCM,data:Jzp3GqzYYFbHa6k+lx0NQ5iTBp3tiS8COb5tdXsPgw1btpbYb9KEEKriZBJr/RUaAHNcmF6lH4MRFhQzD0zBHK9uzEaUJAXD5z9XjXy9UZB2kOtBEMDA5pcbzhm8dy89cvfC1bwMK9bF1ZcqgnAPRWnML76y9xPy8+vME2J3wP8=,iv:kg6nYxsEAaQizR1/ihst8dRxTNwzDIHawsOh9PNW2OE=,tag:go8g1llvlfZONQr5cq6YbA==,type:str]
|
||||||
pgp:
|
pgp:
|
||||||
- created_at: "2022-01-14T13:38:22Z"
|
- created_at: "2022-01-14T13:38:22Z"
|
||||||
enc: |
|
enc: |
|
||||||
|
@ -39,4 +38,4 @@ sops:
|
||||||
-----END PGP MESSAGE-----
|
-----END PGP MESSAGE-----
|
||||||
fp: 71E08E591553F5EA4CB98745BCE9E4BF632E7CED
|
fp: 71E08E591553F5EA4CB98745BCE9E4BF632E7CED
|
||||||
unencrypted_suffix: _unencrypted
|
unencrypted_suffix: _unencrypted
|
||||||
version: 3.7.1
|
version: 3.7.3
|
||||||
|
|
Loading…
Reference in a new issue