initial commit
This commit is contained in:
commit
4014d5e658
30 changed files with 911 additions and 0 deletions
24
hosts/blobercraft/minecraft.nix
Normal file
24
hosts/blobercraft/minecraft.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
options.minecraft.enable = lib.mkEnableOption "enable minecraft user";
|
||||
config = lib.mkIf config.minecraft.enable {
|
||||
users.users.minecraft = {
|
||||
createHome = true;
|
||||
home = "/home/minecraft";
|
||||
useDefaultShell = true;
|
||||
isNormalUser = true;
|
||||
description = "minecraft server account";
|
||||
group = "minecraft";
|
||||
openssh.authorizedKeys.keys = [] ++ config.ssh.keys;
|
||||
|
||||
# make sure we have every version of java required to run minecraft
|
||||
packages = with pkgs; [
|
||||
jre8
|
||||
jre17_minimal
|
||||
jre21_minimal
|
||||
];
|
||||
};
|
||||
|
||||
users.groups.minecraft = {};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue