Compare commits
No commits in common. "2f46180092441ad1c8a9018d159e43212d11c2ff" and "9060cb6414c4bef04c95f7a9873836ca6e65b67a" have entirely different histories.
2f46180092
...
9060cb6414
|
@ -4,12 +4,6 @@
|
|||
ids.uids = {
|
||||
# System user ids start at 400 (see nixos/modules/programs/shadow.nix)
|
||||
webserver = 400;
|
||||
minecraft = 401;
|
||||
# The limit is 999
|
||||
};
|
||||
|
||||
ids.gids = {
|
||||
webserver = 400;
|
||||
minecraft = 401;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ http {
|
|||
#gzip on;
|
||||
|
||||
upstream php-handler {
|
||||
server localhost:9000;
|
||||
server nextcloud-nextcloud:9000;
|
||||
}
|
||||
|
||||
server {
|
||||
|
|
|
@ -54,16 +54,6 @@ in {
|
|||
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (lib.getName pkg) [ "forge-server" ];
|
||||
|
||||
users = {
|
||||
extraUsers.minecraft = {
|
||||
uid = config.ids.uids.minecraft;
|
||||
group = config.users.extraGroups.minecraft.name;
|
||||
isSystemUser = true;
|
||||
description = "Minecraft server user";
|
||||
};
|
||||
extraGroups.minecraft = { gid = config.ids.gids.minecraft; };
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers.minecraft-voor-kia = let
|
||||
properties = ./configs/minecraft/voor-kia/server.properties;
|
||||
icon = ./configs/minecraft/voor-kia/server-icon.png;
|
||||
|
@ -83,8 +73,9 @@ in {
|
|||
];
|
||||
|
||||
config = let
|
||||
uid = toString config.users.extraUsers.minecraft.uid;
|
||||
gid = toString config.users.extraGroups.minecraft.gid;
|
||||
# Use the upstream minecraft uid
|
||||
uid = toString config.ids.uids.minecraft;
|
||||
gid = toString config.users.groups.nogroup.gid;
|
||||
in {
|
||||
Cmd = [ "forge-server" ] ++ minecraft-server-args;
|
||||
WorkingDir = "/var/lib/minecraft";
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
users = {
|
||||
extraUsers.webserver = {
|
||||
users.extraUsers.webserver = {
|
||||
uid = config.ids.uids.webserver;
|
||||
group = config.users.extraGroups.webserver.name;
|
||||
isSystemUser = true;
|
||||
description = "tlater.net web server user";
|
||||
};
|
||||
extraGroups.webserver = { gid = config.ids.gids.webserver; };
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers.webserver = {
|
||||
image = "tlaternet/webserver";
|
||||
|
@ -20,8 +16,10 @@
|
|||
contents = pkgs.tlaternet-webserver.webserver;
|
||||
|
||||
config = let
|
||||
uid = toString config.users.extraUsers.webserver.uid;
|
||||
gid = toString config.users.extraGroups.webserver.gid;
|
||||
user = config.users.extraUsers.webserver;
|
||||
group = config.users.groups.${user.group};
|
||||
uid = toString user.uid;
|
||||
gid = toString group.gid;
|
||||
in {
|
||||
Cmd = [ "tlaternet-webserver" ];
|
||||
Volumes = { "/srv/mail" = { }; };
|
||||
|
|
|
@ -9,7 +9,7 @@ let
|
|||
url = "${mirror}/${version}/forge-${version}-installer.jar";
|
||||
curlOpts = "--globoff";
|
||||
# Forge doesn't seem to like newer shas
|
||||
sha1 = "sha1-oHNpyrgHluRrAXWZJg9j+OInAwA=";
|
||||
sha1 = "e97821e5431bdcaa46e12048769922e2cdb5e2e1";
|
||||
};
|
||||
|
||||
unpackCmd = "mkdir -p src; cp $curSrc src/forge-${version}-installer.jar";
|
||||
|
|
Loading…
Reference in a new issue