kinda testing dungeonclub

This commit is contained in:
emptyynes 2025-10-02 04:33:03 +07:00
parent 0af2f42c1f
commit 309adacfa4
8 changed files with 81 additions and 8 deletions

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ ... }:
{
imports = [

View file

@ -0,0 +1,14 @@
{ pkgs, lib, config, ... }:
let
dungeonclub-static = "/var/lib/dungeonclub";
dungeonclub-config = config.services.dungeonclub;
in {
config = lib.mkIf dungeonclub-config.enable {
system.activationScripts.dungeonclub-dir = ''
mkdir -p ${dungeonclub-static}/{config,db,storage}
'';
};
}

8
dungeonclub/main.nix Normal file
View file

@ -0,0 +1,8 @@
{ ... }:
{
imports = [
./options.nix
./dungeonclub.nix
];
}

28
dungeonclub/options.nix Normal file
View file

@ -0,0 +1,28 @@
{ lib, ... }:
{
options = with lib; with types; {
services.dungeonclub = {
enable = mkEnableOption "Dungeon Club - Virtual Tabletop";
package = mkOption { type = package; default = pkgs.dungeonclub; description = "Dungeon Club package to use"; };
# build = {
# config-yaml = {
# storage-mb-per-campaign = mkOption { type = int; default = 500; };
# prefabs-per-campaign = mkOption { type = int; default = 20; };
# scenes-per-campaign = mkOption { type = int; default = 20; };
# maps-per-campaign = mkOption { type = int; default = 10; };
# campaigns-per-account = mkOption { type = int; default = 10; };
# };
# copy-music = mkOption { type = bool; default = true; };
# download-icons = mkOption { type = bool; default = true; };
# };
options = {
mock-account = mkOption { type = bool; default = true; };
music = mkOption { type = bool; default = false; };
port = mkOption { type = int; default = 7070; };
};
};
};
}

15
dungeonclub/package.nix Normal file
View file

@ -0,0 +1,15 @@
{ pkgs }:
pkgs.buildDartApplication rec {
pname = "dungeonclub";
version = "1.1";
src = pkgs.fetchFromGitHub {
owner = "doodlezucc";
repo = "dungeonclub";
rev = "master";
hash = "sha256-U6enz8yJcc4Wf8m54eYIAnVg/jsGi247Wy8lp1r1wg4=";
};
pubspecLockFile = ./pubspec.lock;
}

12
flake.lock generated
View file

@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1758791193,
"narHash": "sha256-F8WmEwFoHsnix7rt290R0rFXNJiMbClMZyIC/e+HYf0=",
"lastModified": 1759143472,
"narHash": "sha256-TvODmeR2W7yX/JmOCmP+lAFNkTT7hAxYcF3Kz8SZV3w=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "25e53aa156d47bad5082ff7618f5feb1f5e02d01",
"rev": "5ed4e25ab58fd4c028b59d5611e14ea64de51d23",
"type": "github"
},
"original": {
@ -17,11 +17,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1758690382,
"narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=",
"lastModified": 1759036355,
"narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e643668fd71b949c53f8626614b21ff71a07379d",
"rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127",
"type": "github"
},
"original": {

View file

@ -11,5 +11,13 @@
affine = import ./affine/main.nix;
marzban = import ./marzban/main.nix;
};
packages = (nixpkgs.lib.genAttrs [ "x86_64-linux" ]) (system:
{
dungeonclub = import ./dungeonclub/package.nix {
pkgs = import nixpkgs { inherit system; };
};
}
);
};
}

View file

@ -1,4 +1,4 @@
{pkgs, lib, stdenv, config, ...}:
{ ... }:
{
imports = [