kinda testing dungeonclub
This commit is contained in:
parent
0af2f42c1f
commit
309adacfa4
8 changed files with 81 additions and 8 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
|
|
||||||
14
dungeonclub/dungeonclub.nix
Normal file
14
dungeonclub/dungeonclub.nix
Normal 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
8
dungeonclub/main.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./options.nix
|
||||||
|
./dungeonclub.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
28
dungeonclub/options.nix
Normal file
28
dungeonclub/options.nix
Normal 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
15
dungeonclub/package.nix
Normal 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
12
flake.lock
generated
|
|
@ -2,11 +2,11 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1758791193,
|
"lastModified": 1759143472,
|
||||||
"narHash": "sha256-F8WmEwFoHsnix7rt290R0rFXNJiMbClMZyIC/e+HYf0=",
|
"narHash": "sha256-TvODmeR2W7yX/JmOCmP+lAFNkTT7hAxYcF3Kz8SZV3w=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "25e53aa156d47bad5082ff7618f5feb1f5e02d01",
|
"rev": "5ed4e25ab58fd4c028b59d5611e14ea64de51d23",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -17,11 +17,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1758690382,
|
"lastModified": 1759036355,
|
||||||
"narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=",
|
"narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e643668fd71b949c53f8626614b21ff71a07379d",
|
"rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
|
|
@ -11,5 +11,13 @@
|
||||||
affine = import ./affine/main.nix;
|
affine = import ./affine/main.nix;
|
||||||
marzban = import ./marzban/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; };
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{pkgs, lib, stdenv, config, ...}:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue