Merge pull request 'Require README.md for every clan module' (#1302) from Qubasa-main into main
This commit is contained in:
@@ -12,11 +12,11 @@
|
|||||||
{ lib, modulesPath, ... }:
|
{ lib, modulesPath, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
self.clanModules.diskLayouts
|
self.clanModules.disk-layouts
|
||||||
(modulesPath + "/testing/test-instrumentation.nix") # we need these 2 modules always to be able to run the tests
|
(modulesPath + "/testing/test-instrumentation.nix") # we need these 2 modules always to be able to run the tests
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
];
|
];
|
||||||
clan.diskLayouts.singleDiskExt4.device = "/dev/vdb";
|
clan.disk-layouts.singleDiskExt4.device = "/dev/vdb";
|
||||||
|
|
||||||
environment.etc."install-successful".text = "ok";
|
environment.etc."install-successful".text = "ok";
|
||||||
|
|
||||||
|
|||||||
2
clanModules/borgbackup/README.md
Normal file
2
clanModules/borgbackup/README.md
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Efficient, deduplicating backup program with optional compression and secure encryption.
|
||||||
|
---
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
Email-based instant messaging for Desktop.
|
Email-based instant messaging for Desktop.
|
||||||
|
---
|
||||||
|
|
||||||
!!! warning "Under construction"
|
!!! warning "Under construction"
|
||||||
|
|
||||||
|
|||||||
2
clanModules/disk-layouts/README.md
Normal file
2
clanModules/disk-layouts/README.md
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Automatically format a disk drive on clan installation
|
||||||
|
---
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
{
|
{
|
||||||
options.clan.diskLayouts.singleDiskExt4 = {
|
options.clan.disk-layouts.singleDiskExt4 = {
|
||||||
device = lib.mkOption {
|
device = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
example = "/dev/disk/by-id/ata-Samsung_SSD_850_EVO_250GB_S21PNXAGB12345";
|
example = "/dev/disk/by-id/ata-Samsung_SSD_850_EVO_250GB_S21PNXAGB12345";
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
disk = {
|
disk = {
|
||||||
main = {
|
main = {
|
||||||
type = "disk";
|
type = "disk";
|
||||||
device = config.clan.diskLayouts.singleDiskExt4.device;
|
device = config.clan.disk-layouts.singleDiskExt4.device;
|
||||||
content = {
|
content = {
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
partitions = {
|
partitions = {
|
||||||
2
clanModules/ergochat/README.md
Normal file
2
clanModules/ergochat/README.md
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
A modern IRC server
|
||||||
|
---
|
||||||
@@ -1,28 +1,25 @@
|
|||||||
{ inputs, ... }:
|
{ inputs, ... }:
|
||||||
{
|
{
|
||||||
flake.clanModules = {
|
flake.clanModules = {
|
||||||
diskLayouts = {
|
disk-layouts = {
|
||||||
imports = [
|
imports = [
|
||||||
./diskLayouts.nix
|
./disk-layouts
|
||||||
inputs.disko.nixosModules.default
|
inputs.disko.nixosModules.default
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
borgbackup = ./borgbackup.nix;
|
borgbackup = ./borgbackup;
|
||||||
ergochat = ./ergochat.nix;
|
ergochat = ./ergochat;
|
||||||
deltachat = ./deltachat;
|
deltachat = ./deltachat;
|
||||||
graphical = ./graphical.nix;
|
localbackup = ./localbackup;
|
||||||
localbackup = ./localbackup.nix;
|
localsend = ./localsend;
|
||||||
localsend = ./localsend.nix;
|
matrix-synapse = ./matrix-synapse;
|
||||||
matrix-synapse = ./matrix-synapse.nix;
|
moonlight = ./moonlight;
|
||||||
moonlight = ./moonlight.nix;
|
sshd = ./sshd;
|
||||||
sshd = ./sshd.nix;
|
sunshine = ./sunshine;
|
||||||
sunshine = ./sunshine.nix;
|
|
||||||
syncthing = ./syncthing;
|
syncthing = ./syncthing;
|
||||||
root-password = ./root-password;
|
root-password = ./root-password;
|
||||||
thelounge = ./thelounge.nix;
|
thelounge = ./thelounge;
|
||||||
vm-user = ./vm-user.nix;
|
xfce = ./xfce;
|
||||||
xfce = ./xfce.nix;
|
zt-tcp-relay = ./zt-tcp-relay;
|
||||||
xfce-vm = ./xfce-vm.nix;
|
|
||||||
zt-tcp-relay = ./zt-tcp-relay.nix;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
_: { fonts.enableDefaultPackages = true; }
|
|
||||||
2
clanModules/localbackup/README.md
Normal file
2
clanModules/localbackup/README.md
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Automatically backups current machine to local directory.
|
||||||
|
---
|
||||||
2
clanModules/localsend/README.md
Normal file
2
clanModules/localsend/README.md
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Securely sharing files and messages over a local network without internet connectivity.
|
||||||
|
---
|
||||||
2
clanModules/matrix-synapse/README.md
Normal file
2
clanModules/matrix-synapse/README.md
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
A federated messaging server with end-to-end encryption.
|
||||||
|
---
|
||||||
2
clanModules/moonlight/README.md
Normal file
2
clanModules/moonlight/README.md
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
A desktop streaming client optimized for remote gaming and synchronized movie viewing.
|
||||||
|
---
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
Creates a root-password
|
Automatically generates and configures a password for the root user.
|
||||||
|
---
|
||||||
!!! tip "This module sets the password for the root user (automatically)."
|
|
||||||
|
|
||||||
After the system was installed/deployed the following command can be used to display the root-password:
|
After the system was installed/deployed the following command can be used to display the root-password:
|
||||||
|
|
||||||
@@ -8,6 +7,5 @@ After the system was installed/deployed the following command can be used to dis
|
|||||||
clan secrets get {machine_name}-password
|
clan secrets get {machine_name}-password
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
See also: [Facts / Secrets](../../getting-started/secrets.md)
|
See also: [Facts / Secrets](../../getting-started/secrets.md)
|
||||||
|
|||||||
2
clanModules/sshd/README.md
Normal file
2
clanModules/sshd/README.md
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Enables secure remote access to the machine over ssh
|
||||||
|
---
|
||||||
2
clanModules/sunshine/README.md
Normal file
2
clanModules/sunshine/README.md
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
A desktop streaming server optimized for remote gaming and synchronized movie viewing.
|
||||||
|
---
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
Syncthing is a free, open-source file synchronization application designed to allow users to synchronize files between multiple devices over the internet or local networks securely and privately.
|
A secure, file synchronization app for devices over networks, offering a private alternative to cloud services.
|
||||||
|
---
|
||||||
It is an alternative to cloud-based file sharing services.
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
We recommend configuring this module as an sync-service through the provided options. Although it provides a Web GUI through which more usage scenarios are supported.
|
We recommend configuring this module as an sync-service through the provided options. Although it provides a Web GUI through which more usage scenarios are supported.
|
||||||
|
|||||||
2
clanModules/thelounge/README.md
Normal file
2
clanModules/thelounge/README.md
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Modern web IRC client
|
||||||
|
---
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
security = {
|
|
||||||
sudo.wheelNeedsPassword = false;
|
|
||||||
polkit.enable = true;
|
|
||||||
rtkit.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.user = {
|
|
||||||
isNormalUser = true;
|
|
||||||
createHome = true;
|
|
||||||
uid = 1000;
|
|
||||||
initialHashedPassword = "";
|
|
||||||
extraGroups = [
|
|
||||||
"wheel"
|
|
||||||
"video"
|
|
||||||
"render"
|
|
||||||
];
|
|
||||||
shell = "/run/current-system/sw/bin/bash";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
imports = [
|
|
||||||
./vm-user.nix
|
|
||||||
./graphical.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
services.xserver = {
|
|
||||||
enable = true;
|
|
||||||
displayManager.autoLogin.enable = true;
|
|
||||||
displayManager.autoLogin.user = "user";
|
|
||||||
desktopManager.xfce.enable = true;
|
|
||||||
desktopManager.xfce.enableScreensaver = false;
|
|
||||||
xkb.layout = "us";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
1
clanModules/xfce/README.md
Normal file
1
clanModules/xfce/README.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
---
|
||||||
1
clanModules/zt-tcp-relay/README.md
Normal file
1
clanModules/zt-tcp-relay/README.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
---
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${
|
ExecStart = "${
|
||||||
pkgs.callPackage ../pkgs/zt-tcp-relay { }
|
pkgs.callPackage ../../pkgs/zt-tcp-relay { }
|
||||||
}/bin/zt-tcp-relay --listen [::]:${builtins.toString config.clan.zt-tcp-relay.port}";
|
}/bin/zt-tcp-relay --listen [::]:${builtins.toString config.clan.zt-tcp-relay.port}";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
RestartSec = "5";
|
RestartSec = "5";
|
||||||
@@ -55,9 +55,8 @@ nav:
|
|||||||
- clanModules:
|
- clanModules:
|
||||||
- reference/clanModules/borgbackup.md
|
- reference/clanModules/borgbackup.md
|
||||||
- reference/clanModules/deltachat.md
|
- reference/clanModules/deltachat.md
|
||||||
- reference/clanModules/diskLayouts.md
|
- reference/clanModules/disk-layouts.md
|
||||||
- reference/clanModules/ergochat.md
|
- reference/clanModules/ergochat.md
|
||||||
- reference/clanModules/graphical.md
|
|
||||||
- reference/clanModules/localbackup.md
|
- reference/clanModules/localbackup.md
|
||||||
- reference/clanModules/localsend.md
|
- reference/clanModules/localsend.md
|
||||||
- reference/clanModules/matrix-synapse.md
|
- reference/clanModules/matrix-synapse.md
|
||||||
@@ -67,8 +66,6 @@ nav:
|
|||||||
- reference/clanModules/sunshine.md
|
- reference/clanModules/sunshine.md
|
||||||
- reference/clanModules/syncthing.md
|
- reference/clanModules/syncthing.md
|
||||||
- reference/clanModules/thelounge.md
|
- reference/clanModules/thelounge.md
|
||||||
- reference/clanModules/vm-user.md
|
|
||||||
- reference/clanModules/xfce-vm.md
|
|
||||||
- reference/clanModules/xfce.md
|
- reference/clanModules/xfce.md
|
||||||
- reference/clanModules/zt-tcp-relay.md
|
- reference/clanModules/zt-tcp-relay.md
|
||||||
- Contributing: contributing/contributing.md
|
- Contributing: contributing/contributing.md
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ let
|
|||||||
) clanModules;
|
) clanModules;
|
||||||
|
|
||||||
clanModulesReadmes = builtins.mapAttrs (
|
clanModulesReadmes = builtins.mapAttrs (
|
||||||
module_name: _module: self.lib.modules.getDescription module_name
|
module_name: _module: self.lib.modules.getReadme module_name
|
||||||
) clanModules;
|
) clanModules;
|
||||||
|
|
||||||
# clanCore docs
|
# clanCore docs
|
||||||
|
|||||||
@@ -1,19 +1,26 @@
|
|||||||
{ clan-core, ... }:
|
{ clan-core, ... }:
|
||||||
|
|
||||||
{
|
rec {
|
||||||
getDescription =
|
getReadme =
|
||||||
modulename:
|
modulename:
|
||||||
let
|
let
|
||||||
readme = "${clan-core}/clanModules/${modulename}/README.md";
|
readme = "${clan-core}/clanModules/${modulename}/README.md";
|
||||||
readmeContents =
|
readmeContents =
|
||||||
if
|
if (builtins.pathExists readme) then
|
||||||
builtins.trace "Trying to get Module README.md for ${modulename} from ${readme}"
|
|
||||||
# TODO: Edge cases
|
|
||||||
(builtins.pathExists readme)
|
|
||||||
then
|
|
||||||
(builtins.readFile readme)
|
(builtins.readFile readme)
|
||||||
else
|
else
|
||||||
null;
|
throw "No README.md found for module ${modulename}";
|
||||||
in
|
in
|
||||||
readmeContents;
|
readmeContents;
|
||||||
|
|
||||||
|
getShortDescription =
|
||||||
|
modulename:
|
||||||
|
let
|
||||||
|
content = (getReadme modulename);
|
||||||
|
parts = builtins.split "---" content;
|
||||||
|
in
|
||||||
|
if (builtins.length parts) > 0 then
|
||||||
|
builtins.head parts
|
||||||
|
else
|
||||||
|
throw "Short description delimiter `---` not found in README.md for module ${modulename}";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
clanModuleFunctionSchemas = lib.mapAttrsFlatten (modulename: module: {
|
clanModuleFunctionSchemas = lib.mapAttrsFlatten (modulename: module: {
|
||||||
name = modulename;
|
name = modulename;
|
||||||
description = self.lib.modules.getDescription modulename;
|
description = self.lib.modules.getShortDescription modulename;
|
||||||
parameters = self.lib.jsonschema.parseOptions (optionsFromModule modulename module);
|
parameters = self.lib.jsonschema.parseOptions (optionsFromModule modulename module);
|
||||||
}) clanModules;
|
}) clanModules;
|
||||||
in
|
in
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
checks = {
|
checks = {
|
||||||
module-schema = pkgs.runCommand "schema-checks" { } ''
|
module-schema = pkgs.runCommand "schema-checks" { } ''
|
||||||
${pkgs.check-jsonschema}/bin/check-jsonschema \
|
${pkgs.check-jsonschema}/bin/check-jsonschema \
|
||||||
--check-metaschema ${packages.module-schema}
|
--check-metaschema --fill-defaults ${packages.module-schema}
|
||||||
touch $out
|
touch $out
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
clan-core.clanModules.sshd
|
clan-core.clanModules.sshd
|
||||||
clan-core.clanModules.diskLayouts
|
clan-core.clanModules.disk-layouts
|
||||||
clan-core.clanModules.root-password
|
clan-core.clanModules.root-password
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user