mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
feat(access): minecraft
This commit is contained in:
parent
75b123776b
commit
f3b8f606b8
9 changed files with 55 additions and 17 deletions
|
|
@ -9,6 +9,10 @@
|
|||
inherit (lib.attrsets) listToAttrs nameValuePair;
|
||||
inherit (config.services.steam) accountSwitch beatsaber;
|
||||
cfg = config.kyuuto;
|
||||
mapId = id:
|
||||
if config.proxmoxLXC.privileged or true
|
||||
then 100000 + id
|
||||
else id;
|
||||
in {
|
||||
options.kyuuto = with lib.types; {
|
||||
setup = mkEnableOption "directory and permission setup";
|
||||
|
|
@ -32,6 +36,10 @@ in {
|
|||
type = path;
|
||||
default = cfg.libraryDir + "/games";
|
||||
};
|
||||
dataDir = mkOption {
|
||||
type = path;
|
||||
default = "/mnt/kyuuto-data";
|
||||
};
|
||||
gameLibraries = mkOption {
|
||||
type = listOf str;
|
||||
default = ["PC"];
|
||||
|
|
@ -98,6 +106,10 @@ in {
|
|||
${cfg.libraryDir + "/movies"} = leaf;
|
||||
${cfg.libraryDir + "/software"} = leaf;
|
||||
${cfg.libraryDir + "/books"} = leaf;
|
||||
${cfg.dataDir + "/minecraft/simplebackups"} = leaf // {
|
||||
owner = toString (mapId 913); # minecraft-bedrock uid
|
||||
group = "admin";
|
||||
};
|
||||
${cfg.gameLibraryDir} = shared;
|
||||
}
|
||||
(listToAttrs (
|
||||
|
|
@ -123,10 +135,6 @@ in {
|
|||
};
|
||||
|
||||
users = let
|
||||
mapId = id:
|
||||
if config.proxmoxLXC.privileged or true
|
||||
then 100000 + id
|
||||
else id;
|
||||
mkDummyUsers = {
|
||||
name,
|
||||
group ? name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue