mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Add vrising server
This commit is contained in:
parent
fae7af9511
commit
5a6fb78d28
4 changed files with 61 additions and 4 deletions
|
|
@ -42,6 +42,8 @@ in {
|
||||||
mods.server.cal.enable = true;
|
mods.server.cal.enable = true;
|
||||||
mods.server.chat.enable = true;
|
mods.server.chat.enable = true;
|
||||||
|
|
||||||
|
mods.server.vrising.enable = true;
|
||||||
|
|
||||||
mods.tailscale.enable = true;
|
mods.tailscale.enable = true;
|
||||||
mods.wireguard.id = 3;
|
mods.wireguard.id = 3;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
# Arion works with Docker, but for NixOS-based containers, you need Podman
|
# Arion works with Docker, but for NixOS-based containers, you need Podman
|
||||||
# since NixOS 21.05.
|
# since NixOS 21.05.
|
||||||
virtualisation.docker.enable = true;
|
# virtualisation.docker.enable = true;
|
||||||
# virtualisation.podman.enable = true;
|
# virtualisation.podman.enable = true;
|
||||||
# virtualisation.podman.dockerSocket.enable = true;
|
# virtualisation.podman.dockerSocket.enable = true;
|
||||||
# virtualisation.podman.defaultNetwork.dnsname.enable = true;
|
# virtualisation.podman.defaultNetwork.dnsname.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
imports = [
|
imports = [ ./astral.nix ./vrising.nix ];
|
||||||
./astral.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
config = lib.mkIf config.mods.server.gaming.enable {
|
config = lib.mkIf config.mods.server.gaming.enable {
|
||||||
mods.server.astral.enable = true;
|
mods.server.astral.enable = true;
|
||||||
|
|
|
||||||
57
modules/nixos/server/gaming/vrising.nix
Normal file
57
modules/nixos/server/gaming/vrising.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
||||||
|
# Auto-generated using compose2nix v0.3.2-pre.
|
||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
let cfg = config.mods.server.vrising;
|
||||||
|
in with lib; {
|
||||||
|
options.mods.server.vrising = {
|
||||||
|
enable = mkEnableOption {
|
||||||
|
default = false;
|
||||||
|
description = "enables docker containers";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
# Runtime
|
||||||
|
virtualisation.podman = {
|
||||||
|
enable = true;
|
||||||
|
autoPrune.enable = true;
|
||||||
|
dockerCompat = true;
|
||||||
|
defaultNetwork.settings = {
|
||||||
|
# Required for container networking to be able to use names.
|
||||||
|
dns_enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable container name DNS for non-default Podman networks.
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/226365
|
||||||
|
networking.firewall.interfaces."podman+".allowedUDPPorts = [ 53 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 9876 9877 ];
|
||||||
|
|
||||||
|
virtualisation.oci-containers.backend = "podman";
|
||||||
|
|
||||||
|
# Containers
|
||||||
|
virtualisation.oci-containers.containers."vrising-vrising" = {
|
||||||
|
image = "trueosiris/vrising";
|
||||||
|
environment = { "SERVERNAME" = "yapping at the succ"; };
|
||||||
|
volumes = [
|
||||||
|
"/home/muon/projects/vrising/container/persistentdata:/mnt/vrising/persistentdata:rw"
|
||||||
|
"/home/muon/projects/vrising/container/server:/mnt/vrising/server:rw"
|
||||||
|
];
|
||||||
|
ports = [ "0.0.0.0:9876:9876/udp" "0.0.0.0:9877:9877/udp" ];
|
||||||
|
log-driver = "journald";
|
||||||
|
extraOptions = [ ];
|
||||||
|
};
|
||||||
|
systemd.services."podman-vrising-vrising" = {
|
||||||
|
serviceConfig = { Restart = lib.mkOverride 90 "always"; };
|
||||||
|
partOf = [ "podman-compose-vrising-root.target" ];
|
||||||
|
wantedBy = [ "podman-compose-vrising-root.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Root service
|
||||||
|
# When started, this will automatically create all resources and start
|
||||||
|
# the containers. When stopped, this will teardown all resources.
|
||||||
|
systemd.targets."podman-compose-vrising-root" = {
|
||||||
|
unitConfig = { Description = "Root target generated by compose2nix."; };
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue