ClanModules: Add docs and api to retrieve metadata
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
Statically configure borgbackup with sane defaults.
|
||||
---
|
||||
This module implements the `borgbackup` backend and implements sane defaults
|
||||
description = "Statically configure borgbackup with sane defaults."
|
||||
---
|
||||
This module implements the `borgbackup` backend and implements sane defaults
|
||||
for backup management through `borgbackup` for members of the clan.
|
||||
|
||||
Configure target machines where the backups should be sent to through `targets`.
|
||||
|
||||
Configure machines that should be backuped either through `includeMachines`
|
||||
which will exclusively add the included machines to be backuped, or through
|
||||
which will exclusively add the included machines to be backuped, or through
|
||||
`excludeMachines`, which will add every machine except the excluded machine to the backup.
|
||||
|
||||
@@ -1,2 +1,7 @@
|
||||
Efficient, deduplicating backup program with optional compression and secure encryption.
|
||||
---
|
||||
---
|
||||
description = "Efficient, deduplicating backup program with optional compression and secure encryption."
|
||||
categories = ["backup"]
|
||||
---
|
||||
Long explanations1
|
||||
Long explanations2
|
||||
Long explanations3
|
||||
|
||||
@@ -27,54 +27,51 @@ let
|
||||
exit 1
|
||||
fi
|
||||
'';
|
||||
|
||||
# Each .nix file in the roles directory is a role
|
||||
# TODO: Helper function to set available roles within module meta.
|
||||
roles =
|
||||
if builtins.pathExists ./roles then
|
||||
lib.pipe ./roles [
|
||||
builtins.readDir
|
||||
(lib.filterAttrs (_n: v: v == "regular"))
|
||||
lib.attrNames
|
||||
(map (fileName: lib.removeSuffix ".nix" fileName))
|
||||
]
|
||||
else
|
||||
null;
|
||||
|
||||
# TODO: make this an interface of every module
|
||||
# Maybe load from readme.md
|
||||
metaInfoOption = lib.mkOption {
|
||||
readOnly = true;
|
||||
description = ''
|
||||
Meta is used to retrieve information about this module.
|
||||
|
||||
- `availableRoles` is a list of roles that can be assigned via the inventory.
|
||||
- `category` is used to group services in the clan marketplace.
|
||||
- `description` is a short description of the service for the clan marketplace.
|
||||
'';
|
||||
default = {
|
||||
description = "Borgbackup is a backup program. Optionally, it supports compression and authenticated encryption.";
|
||||
availableRoles = roles;
|
||||
category = "backup";
|
||||
};
|
||||
type = lib.types.submodule {
|
||||
options = {
|
||||
description = lib.mkOption { type = lib.types.str; };
|
||||
availableRoles = lib.mkOption { type = lib.types.nullOr (lib.types.listOf lib.types.str); };
|
||||
category = lib.mkOption {
|
||||
description = "A category for the service. This is used to group services in the clan ui";
|
||||
type = lib.types.enum [
|
||||
"backup"
|
||||
"network"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
# Each .nix file in the roles directory is a role
|
||||
# TODO: Helper function to set available roles within module meta.
|
||||
# roles =
|
||||
# if builtins.pathExists ./roles then
|
||||
# lib.pipe ./roles [
|
||||
# builtins.readDir
|
||||
# (lib.filterAttrs (_n: v: v == "regular"))
|
||||
# lib.attrNames
|
||||
# (map (fileName: lib.removeSuffix ".nix" fileName))
|
||||
# ]
|
||||
# else
|
||||
# null;
|
||||
# TODO: make this an interface of every module
|
||||
# Maybe load from readme.md
|
||||
# metaInfoOption = lib.mkOption {
|
||||
# readOnly = true;
|
||||
# description = ''
|
||||
# Meta is used to retrieve information about this module.
|
||||
# - `availableRoles` is a list of roles that can be assigned via the inventory.
|
||||
# - `category` is used to group services in the clan marketplace.
|
||||
# - `description` is a short description of the service for the clan marketplace.
|
||||
# '';
|
||||
# default = {
|
||||
# description = "Borgbackup is a backup program. Optionally, it supports compression and authenticated encryption.";
|
||||
# availableRoles = roles;
|
||||
# category = "backup";
|
||||
# };
|
||||
# type = lib.types.submodule {
|
||||
# options = {
|
||||
# description = lib.mkOption { type = lib.types.str; };
|
||||
# availableRoles = lib.mkOption { type = lib.types.nullOr (lib.types.listOf lib.types.str); };
|
||||
# category = lib.mkOption {
|
||||
# description = "A category for the service. This is used to group services in the clan ui";
|
||||
# type = lib.types.enum [
|
||||
# "backup"
|
||||
# "network"
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
{
|
||||
|
||||
options.clan.borgbackup.meta = metaInfoOption;
|
||||
# options.clan.borgbackup.meta = metaInfoOption;
|
||||
|
||||
options.clan.borgbackup.destinations = lib.mkOption {
|
||||
type = lib.types.attrsOf (
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Email-based instant messaging for Desktop.
|
||||
---
|
||||
description = "Email-based instant messaging for Desktop."
|
||||
---
|
||||
|
||||
!!! warning "Under construction"
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
Automatically format a disk drive on clan installation
|
||||
---
|
||||
@@ -1,48 +0,0 @@
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
options.clan.disk-layouts.singleDiskExt4 = {
|
||||
device = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
example = "/dev/disk/by-id/ata-Samsung_SSD_850_EVO_250GB_S21PNXAGB12345";
|
||||
};
|
||||
};
|
||||
config = {
|
||||
boot.loader.grub.efiSupport = lib.mkDefault true;
|
||||
boot.loader.grub.efiInstallAsRemovable = lib.mkDefault true;
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
type = "disk";
|
||||
device = config.clan.disk-layouts.singleDiskExt4.device;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
size = "1M";
|
||||
type = "EF02"; # for grub MBR
|
||||
priority = 1;
|
||||
};
|
||||
ESP = {
|
||||
size = "512M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,2 +1,3 @@
|
||||
A modern IRC server
|
||||
---
|
||||
description = "A modern IRC server"
|
||||
---
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
{ ... }:
|
||||
{
|
||||
flake.clanModules = {
|
||||
disk-layouts = {
|
||||
imports = [ ./disk-layouts ];
|
||||
};
|
||||
borgbackup = ./borgbackup;
|
||||
borgbackup-static = ./borgbackup-static;
|
||||
deltachat = ./deltachat;
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
Automatically backups current machine to local directory.
|
||||
---
|
||||
description = "Automatically backups current machine to local directory."
|
||||
---
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
Securely sharing files and messages over a local network without internet connectivity.
|
||||
---
|
||||
description = "Securely sharing files and messages over a local network without internet connectivity."
|
||||
---
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
A federated messaging server with end-to-end encryption.
|
||||
---
|
||||
description = "A federated messaging server with end-to-end encryption."
|
||||
---
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
A desktop streaming client optimized for remote gaming and synchronized movie viewing.
|
||||
---
|
||||
description = "A desktop streaming client optimized for remote gaming and synchronized movie viewing."
|
||||
---
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
A free and open-source relational database management system (RDBMS) emphasizing extensibility and SQL compliance.
|
||||
---
|
||||
description = "A free and open-source relational database management system (RDBMS) emphasizing extensibility and SQL compliance."
|
||||
---
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Automatically generates and configures a password for the root user.
|
||||
---
|
||||
description = "Automatically generates and configures a password for the root user."
|
||||
---
|
||||
|
||||
After the system was installed/deployed the following command can be used to display the root-password:
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
Enables secure remote access to the machine over ssh
|
||||
---
|
||||
description = "Enables secure remote access to the machine over ssh"
|
||||
---
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
Statically configure the host names of machines based on their respective zerotier-ip.
|
||||
---
|
||||
description = "Statically configure the host names of machines based on their respective zerotier-ip."
|
||||
---
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
A desktop streaming server optimized for remote gaming and synchronized movie viewing.
|
||||
---
|
||||
description = "A desktop streaming server optimized for remote gaming and synchronized movie viewing."
|
||||
---
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
Statically configure syncthing peers through clan
|
||||
---
|
||||
description = "Statically configure syncthing peers through clan"
|
||||
---
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
A secure, file synchronization app for devices over networks, offering a private alternative to cloud services.
|
||||
---
|
||||
description = "A secure, file synchronization app for devices over networks, offering a private alternative to cloud services."
|
||||
---
|
||||
## Usage
|
||||
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
Modern web IRC client
|
||||
---
|
||||
description = "Modern web IRC client"
|
||||
---
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
This module sets the `clan.lol` and `nix-community` cache up as a trusted cache.
|
||||
---
|
||||
description = "This module sets the `clan.lol` and `nix-community` cache up as a trusted cache."
|
||||
----
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Automatically generates and configures a password for the specified user account.
|
||||
---
|
||||
description = "Automatically generates and configures a password for the specified user account."
|
||||
---
|
||||
|
||||
If setting the option prompt to true, the user will be prompted to type in their desired password.
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
A lightweight desktop manager
|
||||
---
|
||||
description = "A lightweight desktop manager"
|
||||
---
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Statically configure the `zerotier` peers of a clan network.
|
||||
---
|
||||
description = "Statically configure the `zerotier` peers of a clan network."
|
||||
---
|
||||
Statically configure the `zerotier` peers of a clan network.
|
||||
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
Enable ZeroTier VPN over TCP for networks where UDP is blocked.
|
||||
---
|
||||
description = "Enable ZeroTier VPN over TCP for networks where UDP is blocked."
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user