docs: add generated configurations readme
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
6aca512b8a
commit
5194199d25
14 changed files with 105 additions and 21 deletions
|
@ -1,9 +1,11 @@
|
||||||
packageMetaFunc=$(cat << EOF
|
getMetaFunc=$(cat << EOF
|
||||||
(x: {
|
(x: {
|
||||||
attrs = builtins.mapAttrs (_: v: {
|
attrs = builtins.mapAttrs (_: v: {
|
||||||
desc = builtins.replaceStrings ["\n"] [" "] (v.meta.description or "");
|
desc = builtins.replaceStrings ["\n"] [" "] (v.meta.description or "");
|
||||||
homepage = v.meta.homepage or "";
|
homepage = v.meta.homepage or "";
|
||||||
}) (builtins.removeAttrs x.\${builtins.currentSystem} ["default"]);
|
roleDesc = builtins.replaceStrings ["\n"] [" "] (v.config.meta.roleDescription or "");
|
||||||
|
hwDesc = builtins.replaceStrings ["\n"] [" "] (v.config.meta.hardwareDescription or "");
|
||||||
|
}) (builtins.removeAttrs (x.\${builtins.currentSystem} or x) ["default"]);
|
||||||
})
|
})
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
|
@ -15,12 +17,13 @@ substitute() {
|
||||||
--impure \
|
--impure \
|
||||||
--json \
|
--json \
|
||||||
"$FLAKE"#"$1" \
|
"$FLAKE"#"$1" \
|
||||||
--apply "$packageMetaFunc" |
|
--apply "$getMetaFunc" |
|
||||||
jq -r
|
jq -r
|
||||||
) -t markdown --template "$2" -o "$3"
|
) -t markdown --template "$FLAKE/apps/gen-docs/templates/$2.md" -o "$FLAKE/$2/README.md"
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO: add configurations, homeManagerModules, lib, modules, nixFastChecks, overlays, scopedPackages
|
# TODO: add homeManagerModules, lib, modules, nixFastChecks, overlays, scopedPackages
|
||||||
substitute "appsPackages" "$FLAKE/apps/gen-docs/templates/apps.md" "$FLAKE/apps/README.md"
|
substitute "appsPackages" "apps"
|
||||||
substitute "devShells" "$FLAKE/apps/gen-docs/templates/devShells.md" "$FLAKE/devShells/README.md"
|
substitute "nixosConfigurations" "configurations"
|
||||||
substitute "packages" "$FLAKE/apps/gen-docs/templates/packages.md" "$FLAKE/packages/README.md"
|
substitute "devShells" "devShells"
|
||||||
|
substitute "packages" "packages"
|
||||||
|
|
13
apps/gen-docs/templates/configurations.md
Normal file
13
apps/gen-docs/templates/configurations.md
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# nixosConfigurations
|
||||||
|
|
||||||
|
This directory contains every device's main configuration file, their `hardware-configuration.nix` and some custom modules
|
||||||
|
unique to them.
|
||||||
|
|
||||||
|
## List of my Devices
|
||||||
|
|
||||||
|
| Name | Model / Specs | Description |
|
||||||
|
| --------- | ------------- | ------------------------------------------------------------------------------------------------ |
|
||||||
|
| `android` | OnePlus 9 Pro | [Nix-On-Droid](https://github.com/nix-community/nix-on-droid) configuration for my OnePlus 9 Pro |
|
||||||
|
$for(attrs/pairs)$
|
||||||
|
| `$it.key$` | $it.value.hwDesc/nowrap$ | $it.value.roleDesc/nowrap$ |
|
||||||
|
$endfor$
|
|
@ -4,8 +4,8 @@ This directory contains every derivations for packages exposed by this flake.
|
||||||
|
|
||||||
## List of my packages found in `self.packages`
|
## List of my packages found in `self.packages`
|
||||||
|
|
||||||
| Name | Description |
|
| Name | Description | Homepage |
|
||||||
| ---- | ----------- |
|
| ---- | ----------- | -------- |
|
||||||
$for(attrs/pairs)$
|
$for(attrs/pairs)$
|
||||||
| `$it.key$` | $it.value.desc/nowrap$ | $it.value.homepage/nowrap$ |
|
| `$it.key$` | $it.value.desc/nowrap$ | $it.value.homepage/nowrap$ |
|
||||||
$endfor$
|
$endfor$
|
||||||
|
|
|
@ -5,14 +5,15 @@ unique to them.
|
||||||
|
|
||||||
## List of my Devices
|
## List of my Devices
|
||||||
|
|
||||||
| Name | Model / Specs | Description |
|
| Name | Model / Specs | Description |
|
||||||
| ------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
| --------- | ------------- | ------------------------------------------------------------------------------------------------ |
|
||||||
| `android` | OnePlus 9 Pro | [Nix-On-Droid](https://github.com/nix-community/nix-on-droid) configuration for my OnePlus 9 Pro |
|
| `android` | OnePlus 9 Pro | [Nix-On-Droid](https://github.com/nix-community/nix-on-droid) configuration for my OnePlus 9 Pro |
|
||||||
| `bbsteamie` | 512GB OLED | My wife's SteamDeck that has a pink case (it took a lot of convincing for this) |
|
| `bbsteamie` | 512GB OLED | My wife's SteamDeck that has a pink case (it took a lot of convincing for this) |
|
||||||
| `binto` | NVIDIA 3070 with Ryzen 7 3700X | Desktop PC with a multi-monitor setup |
|
| `binto` | NVIDIA 3070 with Ryzen 7 3700X | Desktop PC with a multi-monitor setup |
|
||||||
| `cluster` | Lenovo ThinkCentre M900 | Two Lenovo mini PCs that make use of [NixOS-pcsd](https://github.com/matt1432/nixos-pcsd) to form a cluster |
|
| `homie` | Lenovo Thinkcentre M910q | Mini PC that serves as a Home-assistant server |
|
||||||
| `live-image` | USB key | Basic configuration that serves as my custom ISO target |
|
| `live-image` | USB key | Basic configuration that serves as my custom ISO target |
|
||||||
| `homie` | Lenovo Thinkcentre M910q | Mini PC that serves as a Home-assistant server |
|
| `nos` | NVIDIA 3060 with i5-3600 | Custom built NAS and seedbox for Linux ISOs ;) |
|
||||||
| `nos` | NVIDIA 3060 with i5-3600 | Custom built NAS and seedbox for Linux ISOs ;) |
|
| `servivi` | Headless Ryzen 5 3600 | Gaming PC in a previous life, it is now used as a build farm and hosts game servers |
|
||||||
| `servivi` | Headless Ryzen 5 3600 | Gaming PC in a previous life, it is now used as a build farm and hosts game servers |
|
| `thingone` | Lenovo ThinkCentre M900 | Mini PC that makes use of [NixOS-pcsd](https://github.com/matt1432/nixos-pcsd) to form a cluster with its twin |
|
||||||
| `wim` | ThinkPad L13 Yoga Gen 3 (Ryzen 7 PRO 5875U) | 2-1 Lenovo Laptop that I use for university |
|
| `thingtwo` | Lenovo ThinkCentre M900 | Mini PC that makes use of [NixOS-pcsd](https://github.com/matt1432/nixos-pcsd) to form a cluster with its twin |
|
||||||
|
| `wim` | ThinkPad L13 Yoga Gen 3 (Ryzen 7 PRO 5875U) | 2-1 Lenovo Laptop that I use for university |
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
self.nixosModules.base
|
self.nixosModules.base
|
||||||
self.nixosModules.kmscon
|
self.nixosModules.kmscon
|
||||||
|
self.nixosModules.meta
|
||||||
self.nixosModules.plymouth
|
self.nixosModules.plymouth
|
||||||
self.nixosModules.server
|
self.nixosModules.server
|
||||||
];
|
];
|
||||||
|
@ -41,6 +42,11 @@
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
# `Self` Modules configuration
|
# `Self` Modules configuration
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
|
meta = {
|
||||||
|
roleDescription = "My wife's SteamDeck that has a pink case (it took a lot of convincing for this)";
|
||||||
|
hardwareDescription = "512GB OLED";
|
||||||
|
};
|
||||||
|
|
||||||
roles.base = {
|
roles.base = {
|
||||||
enable = true;
|
enable = true;
|
||||||
user = mainUser;
|
user = mainUser;
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
self.nixosModules.base
|
self.nixosModules.base
|
||||||
self.nixosModules.desktop
|
self.nixosModules.desktop
|
||||||
self.nixosModules.kmscon
|
self.nixosModules.kmscon
|
||||||
|
self.nixosModules.meta
|
||||||
self.nixosModules.server
|
self.nixosModules.server
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -49,6 +50,11 @@
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
# `Self` Modules configuration
|
# `Self` Modules configuration
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
|
meta = {
|
||||||
|
roleDescription = "Desktop PC with a multi-monitor setup";
|
||||||
|
hardwareDescription = "NVIDIA 3070 with Ryzen 7 3700X";
|
||||||
|
};
|
||||||
|
|
||||||
roles.base = {
|
roles.base = {
|
||||||
enable = true;
|
enable = true;
|
||||||
user = mainUser;
|
user = mainUser;
|
||||||
|
|
|
@ -16,6 +16,7 @@ in {
|
||||||
|
|
||||||
self.nixosModules.base
|
self.nixosModules.base
|
||||||
self.nixosModules.kmscon
|
self.nixosModules.kmscon
|
||||||
|
self.nixosModules.meta
|
||||||
self.nixosModules.server
|
self.nixosModules.server
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -53,6 +54,14 @@ in {
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
# `Self` Modules configuration
|
# `Self` Modules configuration
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
|
meta = {
|
||||||
|
roleDescription = ''
|
||||||
|
Mini PC that makes use of [NixOS-pcsd](https://github.com/matt1432/nixos-pcsd)
|
||||||
|
to form a cluster with its twin. Files located in `cluster`
|
||||||
|
'';
|
||||||
|
hardwareDescription = "Lenovo ThinkCentre M900";
|
||||||
|
};
|
||||||
|
|
||||||
roles.base = {
|
roles.base = {
|
||||||
enable = true;
|
enable = true;
|
||||||
user = mainUser;
|
user = mainUser;
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
self.nixosModules.base
|
self.nixosModules.base
|
||||||
self.nixosModules.docker
|
self.nixosModules.docker
|
||||||
self.nixosModules.kmscon
|
self.nixosModules.kmscon
|
||||||
|
self.nixosModules.meta
|
||||||
self.nixosModules.server
|
self.nixosModules.server
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -42,6 +43,11 @@
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
# `Self` Modules configuration
|
# `Self` Modules configuration
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
|
meta = {
|
||||||
|
roleDescription = "Mini PC that serves as a Home-assistant server";
|
||||||
|
hardwareDescription = "Lenovo Thinkcentre M910q";
|
||||||
|
};
|
||||||
|
|
||||||
roles.base = {
|
roles.base = {
|
||||||
enable = true;
|
enable = true;
|
||||||
user = mainUser;
|
user = mainUser;
|
||||||
|
|
|
@ -11,12 +11,18 @@
|
||||||
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
|
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
|
||||||
|
|
||||||
self.nixosModules.base
|
self.nixosModules.base
|
||||||
|
self.nixosModules.meta
|
||||||
self.nixosModules.server
|
self.nixosModules.server
|
||||||
];
|
];
|
||||||
|
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
# `Self` Modules configuration
|
# `Self` Modules configuration
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
|
meta = {
|
||||||
|
roleDescription = "Basic configuration that serves as my custom ISO target";
|
||||||
|
hardwareDescription = "USB key";
|
||||||
|
};
|
||||||
|
|
||||||
roles.base = {
|
roles.base = {
|
||||||
enable = true;
|
enable = true;
|
||||||
user = mainUser;
|
user = mainUser;
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
self.nixosModules.base
|
self.nixosModules.base
|
||||||
self.nixosModules.docker
|
self.nixosModules.docker
|
||||||
self.nixosModules.kmscon
|
self.nixosModules.kmscon
|
||||||
|
self.nixosModules.meta
|
||||||
self.nixosModules.server
|
self.nixosModules.server
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -43,6 +44,11 @@
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
# `Self` Modules configuration
|
# `Self` Modules configuration
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
|
meta = {
|
||||||
|
roleDescription = "Custom built NAS and seedbox for Linux ISOs ;)";
|
||||||
|
hardwareDescription = "NVIDIA 3060 with i5-3600";
|
||||||
|
};
|
||||||
|
|
||||||
roles.base = {
|
roles.base = {
|
||||||
enable = true;
|
enable = true;
|
||||||
user = mainUser;
|
user = mainUser;
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
self.nixosModules.base
|
self.nixosModules.base
|
||||||
self.nixosModules.docker
|
self.nixosModules.docker
|
||||||
self.nixosModules.kmscon
|
self.nixosModules.kmscon
|
||||||
|
self.nixosModules.meta
|
||||||
self.nixosModules.server
|
self.nixosModules.server
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -56,6 +57,11 @@
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
# `Self` Modules configuration
|
# `Self` Modules configuration
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
|
meta = {
|
||||||
|
roleDescription = "Gaming PC in a previous life, it is now used as a build farm and hosts game servers";
|
||||||
|
hardwareDescription = "Headless Ryzen 5 3600";
|
||||||
|
};
|
||||||
|
|
||||||
roles.base = {
|
roles.base = {
|
||||||
enable = true;
|
enable = true;
|
||||||
user = mainUser;
|
user = mainUser;
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
self.nixosModules.desktop
|
self.nixosModules.desktop
|
||||||
self.nixosModules.docker
|
self.nixosModules.docker
|
||||||
self.nixosModules.kmscon
|
self.nixosModules.kmscon
|
||||||
|
self.nixosModules.meta
|
||||||
self.nixosModules.plymouth
|
self.nixosModules.plymouth
|
||||||
self.nixosModules.server
|
self.nixosModules.server
|
||||||
];
|
];
|
||||||
|
@ -59,6 +60,11 @@
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
# `Self` Modules configuration
|
# `Self` Modules configuration
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
|
meta = {
|
||||||
|
roleDescription = "2-1 Lenovo Laptop that I use for university";
|
||||||
|
hardwareDescription = "ThinkPad L13 Yoga Gen 3 (Ryzen 7 PRO 5875U)";
|
||||||
|
};
|
||||||
|
|
||||||
roles.base = {
|
roles.base = {
|
||||||
enable = true;
|
enable = true;
|
||||||
user = mainUser;
|
user = mainUser;
|
||||||
|
|
|
@ -9,6 +9,7 @@ self: {
|
||||||
ha-plus = import ./ha-plus;
|
ha-plus = import ./ha-plus;
|
||||||
kmscon = import ./kmscon;
|
kmscon = import ./kmscon;
|
||||||
nvidia = import ./nvidia;
|
nvidia = import ./nvidia;
|
||||||
|
meta = import ./meta;
|
||||||
plymouth = import ./plymouth;
|
plymouth = import ./plymouth;
|
||||||
server = import ./server;
|
server = import ./server;
|
||||||
tmux = import ./tmux;
|
tmux = import ./tmux;
|
||||||
|
|
15
modules/meta/default.nix
Normal file
15
modules/meta/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{lib, ...}: let
|
||||||
|
inherit (lib) mkOption types;
|
||||||
|
in {
|
||||||
|
options.meta = {
|
||||||
|
roleDescription = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
hardwareDescription = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue