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, ... }:
|
||||
{
|
||||
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 + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
clan.diskLayouts.singleDiskExt4.device = "/dev/vdb";
|
||||
clan.disk-layouts.singleDiskExt4.device = "/dev/vdb";
|
||||
|
||||
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.
|
||||
---
|
||||
|
||||
!!! 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, ... }:
|
||||
{
|
||||
options.clan.diskLayouts.singleDiskExt4 = {
|
||||
options.clan.disk-layouts.singleDiskExt4 = {
|
||||
device = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
example = "/dev/disk/by-id/ata-Samsung_SSD_850_EVO_250GB_S21PNXAGB12345";
|
||||
@@ -13,7 +13,7 @@
|
||||
disk = {
|
||||
main = {
|
||||
type = "disk";
|
||||
device = config.clan.diskLayouts.singleDiskExt4.device;
|
||||
device = config.clan.disk-layouts.singleDiskExt4.device;
|
||||
content = {
|
||||
type = "gpt";
|
||||
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, ... }:
|
||||
{
|
||||
flake.clanModules = {
|
||||
diskLayouts = {
|
||||
disk-layouts = {
|
||||
imports = [
|
||||
./diskLayouts.nix
|
||||
./disk-layouts
|
||||
inputs.disko.nixosModules.default
|
||||
];
|
||||
};
|
||||
borgbackup = ./borgbackup.nix;
|
||||
ergochat = ./ergochat.nix;
|
||||
borgbackup = ./borgbackup;
|
||||
ergochat = ./ergochat;
|
||||
deltachat = ./deltachat;
|
||||
graphical = ./graphical.nix;
|
||||
localbackup = ./localbackup.nix;
|
||||
localsend = ./localsend.nix;
|
||||
matrix-synapse = ./matrix-synapse.nix;
|
||||
moonlight = ./moonlight.nix;
|
||||
sshd = ./sshd.nix;
|
||||
sunshine = ./sunshine.nix;
|
||||
localbackup = ./localbackup;
|
||||
localsend = ./localsend;
|
||||
matrix-synapse = ./matrix-synapse;
|
||||
moonlight = ./moonlight;
|
||||
sshd = ./sshd;
|
||||
sunshine = ./sunshine;
|
||||
syncthing = ./syncthing;
|
||||
root-password = ./root-password;
|
||||
thelounge = ./thelounge.nix;
|
||||
vm-user = ./vm-user.nix;
|
||||
xfce = ./xfce.nix;
|
||||
xfce-vm = ./xfce-vm.nix;
|
||||
zt-tcp-relay = ./zt-tcp-relay.nix;
|
||||
thelounge = ./thelounge;
|
||||
xfce = ./xfce;
|
||||
zt-tcp-relay = ./zt-tcp-relay;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
!!! tip "This module sets the password for the root user (automatically)."
|
||||
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:
|
||||
|
||||
@@ -8,6 +7,5 @@ After the system was installed/deployed the following command can be used to dis
|
||||
clan secrets get {machine_name}-password
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
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.
|
||||
|
||||
It is an alternative to cloud-based file sharing services.
|
||||
|
||||
A secure, file synchronization app for devices over networks, offering a private alternative to cloud services.
|
||||
---
|
||||
## 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.
|
||||
|
||||
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" ];
|
||||
serviceConfig = {
|
||||
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}";
|
||||
Restart = "always";
|
||||
RestartSec = "5";
|
||||
@@ -55,9 +55,8 @@ nav:
|
||||
- clanModules:
|
||||
- reference/clanModules/borgbackup.md
|
||||
- reference/clanModules/deltachat.md
|
||||
- reference/clanModules/diskLayouts.md
|
||||
- reference/clanModules/disk-layouts.md
|
||||
- reference/clanModules/ergochat.md
|
||||
- reference/clanModules/graphical.md
|
||||
- reference/clanModules/localbackup.md
|
||||
- reference/clanModules/localsend.md
|
||||
- reference/clanModules/matrix-synapse.md
|
||||
@@ -67,8 +66,6 @@ nav:
|
||||
- reference/clanModules/sunshine.md
|
||||
- reference/clanModules/syncthing.md
|
||||
- reference/clanModules/thelounge.md
|
||||
- reference/clanModules/vm-user.md
|
||||
- reference/clanModules/xfce-vm.md
|
||||
- reference/clanModules/xfce.md
|
||||
- reference/clanModules/zt-tcp-relay.md
|
||||
- Contributing: contributing/contributing.md
|
||||
|
||||
@@ -38,7 +38,7 @@ let
|
||||
) clanModules;
|
||||
|
||||
clanModulesReadmes = builtins.mapAttrs (
|
||||
module_name: _module: self.lib.modules.getDescription module_name
|
||||
module_name: _module: self.lib.modules.getReadme module_name
|
||||
) clanModules;
|
||||
|
||||
# clanCore docs
|
||||
|
||||
@@ -1,19 +1,26 @@
|
||||
{ clan-core, ... }:
|
||||
|
||||
{
|
||||
getDescription =
|
||||
rec {
|
||||
getReadme =
|
||||
modulename:
|
||||
let
|
||||
readme = "${clan-core}/clanModules/${modulename}/README.md";
|
||||
readmeContents =
|
||||
if
|
||||
builtins.trace "Trying to get Module README.md for ${modulename} from ${readme}"
|
||||
# TODO: Edge cases
|
||||
(builtins.pathExists readme)
|
||||
then
|
||||
if (builtins.pathExists readme) then
|
||||
(builtins.readFile readme)
|
||||
else
|
||||
null;
|
||||
throw "No README.md found for module ${modulename}";
|
||||
in
|
||||
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: {
|
||||
name = modulename;
|
||||
description = self.lib.modules.getDescription modulename;
|
||||
description = self.lib.modules.getShortDescription modulename;
|
||||
parameters = self.lib.jsonschema.parseOptions (optionsFromModule modulename module);
|
||||
}) clanModules;
|
||||
in
|
||||
@@ -46,7 +46,7 @@
|
||||
checks = {
|
||||
module-schema = pkgs.runCommand "schema-checks" { } ''
|
||||
${pkgs.check-jsonschema}/bin/check-jsonschema \
|
||||
--check-metaschema ${packages.module-schema}
|
||||
--check-metaschema --fill-defaults ${packages.module-schema}
|
||||
touch $out
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
imports = [
|
||||
clan-core.clanModules.sshd
|
||||
clan-core.clanModules.diskLayouts
|
||||
clan-core.clanModules.disk-layouts
|
||||
clan-core.clanModules.root-password
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user