parent
a454167053
commit
e3300dcac3
4 changed files with 138 additions and 88 deletions
|
@ -6,6 +6,7 @@
|
||||||
../../modules/tailscale.nix
|
../../modules/tailscale.nix
|
||||||
|
|
||||||
./modules/binary-cache.nix
|
./modules/binary-cache.nix
|
||||||
|
./modules/borgmatic.nix
|
||||||
./modules/minecraft.nix
|
./modules/minecraft.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
32
devices/servivi/modules/borgmatic.nix
Normal file
32
devices/servivi/modules/borgmatic.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
# Make this file declare default settings
|
||||||
|
options.services.borgmatic = with lib; {
|
||||||
|
defaults = mkOption {
|
||||||
|
type = types.attrs;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Make sure known_hosts has the needed info
|
||||||
|
config = {
|
||||||
|
services.borgmatic = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
keep_daily = 7;
|
||||||
|
|
||||||
|
# FIXME: doesn't work, have to put it in /root/.ssh
|
||||||
|
ssh_command = "ssh -i /root/.ssh/borg";
|
||||||
|
encryption_passcommand = "${pkgs.coreutils}/bin/cat ${config.sops.secrets.borg-repo.path}";
|
||||||
|
|
||||||
|
source_directories_must_exist = true;
|
||||||
|
borgmatic_source_directory = "/tmp/borgmatic";
|
||||||
|
store_config_files = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -6,85 +6,102 @@
|
||||||
}: {
|
}: {
|
||||||
imports = [nms.nixosModules.default];
|
imports = [nms.nixosModules.default];
|
||||||
|
|
||||||
services.modded-minecraft-servers = {
|
services = {
|
||||||
eula = true;
|
modded-minecraft-servers = {
|
||||||
user = config.vars.user;
|
eula = true;
|
||||||
group = "users";
|
user = config.vars.user;
|
||||||
|
group = "users";
|
||||||
|
|
||||||
instances = let
|
instances = let
|
||||||
jre8 = pkgs.temurin-bin-8;
|
jre8 = pkgs.temurin-bin-8;
|
||||||
jre17 = pkgs.temurin-bin-17;
|
jre17 = pkgs.temurin-bin-17;
|
||||||
|
|
||||||
defaults = {
|
defaults = {
|
||||||
spawn-protection = 0;
|
spawn-protection = 0;
|
||||||
max-tick-time = 5 * 60 * 1000;
|
max-tick-time = 5 * 60 * 1000;
|
||||||
allow-flight = true;
|
allow-flight = true;
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
# Vanilla Survival
|
# Vanilla Survival
|
||||||
sv = {
|
sv = {
|
||||||
enable = false;
|
enable = false;
|
||||||
|
|
||||||
serverConfig =
|
serverConfig =
|
||||||
{
|
{
|
||||||
server-port = 25569;
|
server-port = 25569;
|
||||||
|
|
||||||
extra-options = {
|
extra-options = {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// defaults;
|
// defaults;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Vanilla Creative
|
# Vanilla Creative
|
||||||
cv = {
|
cv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
jvmMaxAllocation = "6G";
|
jvmMaxAllocation = "6G";
|
||||||
jvmInitialAllocation = "2G";
|
jvmInitialAllocation = "2G";
|
||||||
jvmPackage = jre17;
|
jvmPackage = jre17;
|
||||||
jvmOpts = "";
|
jvmOpts = "";
|
||||||
|
|
||||||
serverConfig =
|
serverConfig =
|
||||||
{
|
{
|
||||||
server-port = 25566;
|
server-port = 25566;
|
||||||
motd = "creative mode gaming";
|
motd = "creative mode gaming";
|
||||||
|
|
||||||
extra-options = {
|
extra-options = {
|
||||||
difficulty = "hard";
|
difficulty = "hard";
|
||||||
enable-command-block = true;
|
enable-command-block = true;
|
||||||
enforce-whitelist = true;
|
enforce-whitelist = true;
|
||||||
gamemode = "creative";
|
gamemode = "creative";
|
||||||
max-players = 6;
|
max-players = 6;
|
||||||
view-distance = 16;
|
view-distance = 16;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// defaults;
|
// defaults;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Modded https://www.curseforge.com/minecraft/modpacks/nomi-ceu
|
# Modded https://www.curseforge.com/minecraft/modpacks/nomi-ceu
|
||||||
nomi = {
|
nomi = {
|
||||||
enable = true;
|
enable = false;
|
||||||
|
|
||||||
jvmMaxAllocation = "10G";
|
jvmMaxAllocation = "10G";
|
||||||
jvmInitialAllocation = "2G";
|
jvmInitialAllocation = "2G";
|
||||||
jvmPackage = jre8;
|
jvmPackage = jre8;
|
||||||
jvmOpts = "";
|
jvmOpts = "";
|
||||||
|
|
||||||
serverConfig =
|
serverConfig =
|
||||||
{
|
{
|
||||||
server-port = 25569;
|
server-port = 25569;
|
||||||
motd = "Nomi CEu Server, v1.7-alpha-2";
|
motd = "Nomi CEu Server, v1.7-alpha-2";
|
||||||
|
|
||||||
extra-options = {
|
extra-options = {
|
||||||
max-players = 8;
|
max-players = 8;
|
||||||
difficulty = 1;
|
difficulty = 1;
|
||||||
view-distance = 10;
|
view-distance = 10;
|
||||||
simulation-distance = 10;
|
simulation-distance = 10;
|
||||||
level-type = "lostcities";
|
level-type = "lostcities";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// defaults;
|
// defaults;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
borgmatic.configurations.mc =
|
||||||
|
config.services.borgmatic.defaults
|
||||||
|
// {
|
||||||
|
source_directories = [
|
||||||
|
"/var/lib/minecraft"
|
||||||
|
];
|
||||||
|
|
||||||
|
repositories = [
|
||||||
|
{
|
||||||
|
label = "PVE";
|
||||||
|
path = "ssh://matt@pve/data/backups/borg";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
44
flake.lock
generated
44
flake.lock
generated
|
@ -334,11 +334,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1703626263,
|
"lastModified": 1703648064,
|
||||||
"narHash": "sha256-gmETBj8mZPFDm/EKoXEPxfs1kRYE5zZT2AiY6LYol0E=",
|
"narHash": "sha256-c4bkc1HnLiFQrwBu5WTKLFY03f9D6Ia61aRmIGW55eU=",
|
||||||
"owner": "horriblename",
|
"owner": "horriblename",
|
||||||
"repo": "hyprgrass",
|
"repo": "hyprgrass",
|
||||||
"rev": "e377be95fe95c2dc490891b76deee81effad8422",
|
"rev": "0165a9ed8679f3f2c62cc868bdaf620e4520d504",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -358,11 +358,11 @@
|
||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1703616278,
|
"lastModified": 1703630866,
|
||||||
"narHash": "sha256-xipHN28RIfB36qNoqesh4NnE/M6YZbEiYhkPHS3BFhI=",
|
"narHash": "sha256-umubRI/GMVQGWVAfERbybfIGA5Rynh2Okc6KGPPKM8Y=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "Hyprland",
|
"repo": "Hyprland",
|
||||||
"rev": "9fb50252d3a128466e80bfc2fb67b45dc923ad41",
|
"rev": "191fa587f4daf9f3bf3e3f791de9e2dc5e95a459",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -426,11 +426,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1703549056,
|
"lastModified": 1703635470,
|
||||||
"narHash": "sha256-FYARnqNH1C3L7ygW33zh/lXgBiI917H/VYR3Xwl8pS4=",
|
"narHash": "sha256-mKhYnxtK0mogmUitf9hcamAcGtJbmMyfAIT9KUeDPcU=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "neovim-nightly-overlay",
|
"repo": "neovim-nightly-overlay",
|
||||||
"rev": "c36deb5e7d85e6d685b2d43ea460e145e01a70d9",
|
"rev": "35b4bc0f31b333ad631bf80fa005566c1af51f9e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -449,11 +449,11 @@
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "contrib",
|
"dir": "contrib",
|
||||||
"lastModified": 1703546163,
|
"lastModified": 1703633178,
|
||||||
"narHash": "sha256-XKOAD8Yz/qPAH0OlQyZYuGgGAKbj2sPaowclr4TDfdk=",
|
"narHash": "sha256-TKbXVF9zombPql9AxDC0uKVjkG3HnKpLQKj8gIea1QY=",
|
||||||
"owner": "neovim",
|
"owner": "neovim",
|
||||||
"repo": "neovim",
|
"repo": "neovim",
|
||||||
"rev": "bbd5c6363c25e8fbbfb962f8f6c5ea1800d431ca",
|
"rev": "c26dc1f77c792fe5cbefd578dc8d1e23c80d3688",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -719,11 +719,11 @@
|
||||||
"nixpkgs": "nixpkgs_6"
|
"nixpkgs": "nixpkgs_6"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1703625203,
|
"lastModified": 1703628847,
|
||||||
"narHash": "sha256-Bl2t13cz93R9fpmJBboFriVoIEDJSNMZxp+P0UhjWHE=",
|
"narHash": "sha256-CiMGqa1twXq50Ub2gGqwZ6jZuWWbISgvj61pUC5uAXc=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs-wayland",
|
"repo": "nixpkgs-wayland",
|
||||||
"rev": "10103010f9794cfabb46540f7a6a99fe50864971",
|
"rev": "34e93cad9a011f28c094ba4d94adc7f59cec08ad",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -898,11 +898,11 @@
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1703627552,
|
"lastModified": 1703646418,
|
||||||
"narHash": "sha256-thW9xfLa5Cd11jKizHF/61GCgeeJvAzG4QfEtFmje/E=",
|
"narHash": "sha256-+O5UYPoboInEqQM0KeNVTz8Dff2dTxDwZOSRTgdOejM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "11f7191037b0715f3fe788ffc94167dda60713a1",
|
"rev": "4b648583aa2718a55740bd6f7e2916c9771762c8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -961,11 +961,11 @@
|
||||||
"sops-nix": "sops-nix"
|
"sops-nix": "sops-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1703564272,
|
"lastModified": 1703648158,
|
||||||
"narHash": "sha256-wDP3A087LAIWXyuYOSlSB+3gzto4UXgYcap+TwZuGLs=",
|
"narHash": "sha256-z2My4To69oyY4xYofSJCAKK6BOMcbA9qRZJoUBpi6+U=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "92f6bcc37d0098e939d183bc735eb65338ebdf2d",
|
"rev": "22a1a1c6a18639e11e4e47a667870dffa527623e",
|
||||||
"revCount": 15,
|
"revCount": 17,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://git@git.nelim.org/matt1432/nixos-secrets"
|
"url": "ssh://git@git.nelim.org/matt1432/nixos-secrets"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue