style: format tree

This commit is contained in:
nhnn
2025-06-18 19:53:44 +03:00
parent ed990906bd
commit 86233cac27
44 changed files with 2523 additions and 2253 deletions

View File

@@ -1,35 +1,38 @@
{
description = "PoC SP module for Mumble conferences server";
outputs = { self }: {
nixosModules.default = import ./module.nix;
configPathsNeeded =
builtins.fromJSON (builtins.readFile ./config-paths-needed.json);
meta = { lib, ... }: {
spModuleSchemaVersion = 1;
id = "mumble";
name = "Mumble";
description = "Open Source, Low Latency, High Quality Voice Chat.";
svgIcon = builtins.readFile ./icon.svg;
showUrl = false;
isMovable = true;
isRequired = false;
canBeBackedUp = true;
backupDescription = "Mumble server data.";
systemdServices = [
"murmur.service"
];
user = "murmur";
group = "murmur";
folders = [
"/var/lib/murmur"
];
license = [
lib.licenses.bsd3
];
homepage = "https://www.mumble.info";
sourcePage = "https://github.com/mumble-voip/mumble";
supportLevel = "normal";
outputs =
{ self }:
{
nixosModules.default = import ./module.nix;
configPathsNeeded = builtins.fromJSON (builtins.readFile ./config-paths-needed.json);
meta =
{ lib, ... }:
{
spModuleSchemaVersion = 1;
id = "mumble";
name = "Mumble";
description = "Open Source, Low Latency, High Quality Voice Chat.";
svgIcon = builtins.readFile ./icon.svg;
showUrl = false;
isMovable = true;
isRequired = false;
canBeBackedUp = true;
backupDescription = "Mumble server data.";
systemdServices = [
"murmur.service"
];
user = "murmur";
group = "murmur";
folders = [
"/var/lib/murmur"
];
license = [
lib.licenses.bsd3
];
homepage = "https://www.mumble.info";
sourcePage = "https://github.com/mumble-voip/mumble";
supportLevel = "normal";
};
};
};
}

View File

@@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
domain = config.selfprivacy.domain;
sp = config.selfprivacy;
@@ -6,55 +11,65 @@ let
in
{
options.selfprivacy.modules.mumble = {
enable = (lib.mkOption {
default = false;
type = lib.types.bool;
description = "Enable Mumble";
}) // {
meta = {
type = "enable";
enable =
(lib.mkOption {
default = false;
type = lib.types.bool;
description = "Enable Mumble";
})
// {
meta = {
type = "enable";
};
};
};
subdomain = (lib.mkOption {
default = "mumble";
type = lib.types.strMatching "[A-Za-z0-9][A-Za-z0-9\-]{0,61}[A-Za-z0-9]";
description = "Subdomain";
}) // {
meta = {
widget = "subdomain";
type = "string";
regex = "[A-Za-z0-9][A-Za-z0-9\-]{0,61}[A-Za-z0-9]";
weight = 0;
subdomain =
(lib.mkOption {
default = "mumble";
type = lib.types.strMatching "[A-Za-z0-9][A-Za-z0-9\-]{0,61}[A-Za-z0-9]";
description = "Subdomain";
})
// {
meta = {
widget = "subdomain";
type = "string";
regex = "[A-Za-z0-9][A-Za-z0-9\-]{0,61}[A-Za-z0-9]";
weight = 0;
};
};
};
location = (lib.mkOption {
type = lib.types.str;
description = "Location";
}) // {
meta = {
type = "location";
location =
(lib.mkOption {
type = lib.types.str;
description = "Location";
})
// {
meta = {
type = "location";
};
};
};
appName = (lib.mkOption {
default = "SelfPrivacy Mumble Service";
type = lib.types.str;
description = "The name of your Mumble server";
}) // {
meta = {
type = "string";
weight = 1;
appName =
(lib.mkOption {
default = "SelfPrivacy Mumble Service";
type = lib.types.str;
description = "The name of your Mumble server";
})
// {
meta = {
type = "string";
weight = 1;
};
};
};
welcomeText = (lib.mkOption {
default = "Welcome to my Mumble server!";
type = lib.types.str;
description = "Welcome message";
}) // {
meta = {
type = "string";
weight = 2;
welcomeText =
(lib.mkOption {
default = "Welcome to my Mumble server!";
type = lib.types.str;
description = "Welcome message";
})
// {
meta = {
type = "string";
weight = 2;
};
};
};
};
config = lib.mkIf cfg.enable {
@@ -79,7 +94,9 @@ in
};
systemd = {
services = {
murmur = { serviceConfig.Slice = "mumble.slice"; };
murmur = {
serviceConfig.Slice = "mumble.slice";
};
murmur-ensure-folder-ownership = {
description = "Ensure murmur folder ownership";
before = [ "murmur.service" ];