60 lines
1.3 KiB
Nix
60 lines
1.3 KiB
Nix
{ config, pkgs, inputs, ... }:
|
|
|
|
{
|
|
imports = [
|
|
./agenix.nix
|
|
./modules/minecraft.nix
|
|
./modules/hardening.nix
|
|
./modules/tailscale.nix
|
|
./modules/discord.nix
|
|
./modules/backup.nix
|
|
./modules/monitoring.nix
|
|
./modules/caddy.nix
|
|
];
|
|
|
|
system.stateVersion = "24.11";
|
|
|
|
boot.loader.grub = {
|
|
enable = true;
|
|
efiSupport = true;
|
|
efiInstallAsRemovable = true;
|
|
};
|
|
|
|
networking.hostName = "compsigh-minecraft";
|
|
|
|
time.timeZone = "America/Los_Angeles";
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
nix.settings = {
|
|
experimental-features = [ "nix-command" "flakes" ];
|
|
auto-optimise-store = true;
|
|
};
|
|
|
|
nix.gc = {
|
|
automatic = true;
|
|
dates = "weekly";
|
|
options = "--delete-older-than 14d";
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
vim
|
|
git
|
|
htop
|
|
tmux
|
|
rsync
|
|
|
|
(writeShellScriptBin "mc-whitelist" ''
|
|
docker exec minecraft rcon-cli whitelist add "$1"
|
|
'')
|
|
(writeShellScriptBin "mc-cmd" ''
|
|
docker exec minecraft rcon-cli "$@"
|
|
'')
|
|
(writeShellScriptBin "mc-logs" ''
|
|
docker logs --tail "''${1:-100}" -f minecraft
|
|
'')
|
|
];
|
|
|
|
users.users.root.openssh.authorizedKeys.keys = [
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE40ISu3ydCqfdpb26JYD5cIN0Fu0id/FDS+xjB5zpqu jetthomaspham@gmail.com"
|
|
];
|
|
}
|