From 201a4bc1b6b2e1324abc4157c6bce383a5ed58d8 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Tue, 26 Dec 2023 10:00:30 +0800 Subject: [PATCH] docs: update modules and Plover README --- hosts/plover/README.adoc | 2 +- modules/README.adoc | 57 ---------------------------------------- 2 files changed, 1 insertion(+), 58 deletions(-) diff --git a/hosts/plover/README.adoc b/hosts/plover/README.adoc index 9b5741c3..37a3e186 100644 --- a/hosts/plover/README.adoc +++ b/hosts/plover/README.adoc @@ -5,7 +5,7 @@ This is Plover, a configuration meant to be used in a low-powered general-purpose machine. It isn't much of an instance to be seriously used yet but hopefully it is getting there. -This configuration is expected to be deployed in a Google Compute instance. +This configuration is expected to be deployed as a Hetzner Cloud instance. It has a reasonable set of assumptions to keep in mind when modifying this configuration: diff --git a/modules/README.adoc b/modules/README.adoc index 75e5e3ad..5455b6d6 100644 --- a/modules/README.adoc +++ b/modules/README.adoc @@ -3,63 +3,6 @@ These are various modules ranging from link:https://nixos.org/manual/nixos/stable/index.html#sec-writing-modules[NixOS modules] and link:https://github.com/nix-community/home-manager[home-manager] modules. -The modules are imported usually through `lib.filesToAttr`, allowing for easier structuring without modifying the index file of each module (i.e., `default.nix`). -(See the implementation for more details.) - -For example, take the following module folder structure of the link:./nixos/[custom NixOS modules]... - -[source, tree] ----- -nixos/ -├── themes/ -│   ├── a-happy-gnome/ -│   │   ├── default.nix -│   │   └── README.adoc -│   ├── a-sad-gnome/ -│   │   ├── default.nix -│   │   └── README.adoc -│   └── default.nix -├── specific/ -│   ├── borg.nix -│   └── prometheus.nix -├── agenix.nix -├── archiving.nix -├── desktop.nix -├── dev.nix -├── editors.nix -└── users.nix ----- - -...where it should have the equivalent attribute set. - -[source, nix] ----- -{ - agenix = path/to/agenix.nix; - archiving = path/to/archiving.nix; - desktop = path/to/desktop.nix; - dev = path/to/dev.nix; - editors = path/to/editors.nix; - specific = { - borg = path/to/specific/borg.nix; - prometheus = path/to/specific/prometheus.nix; - }; - themes = path/to/themes; # Since it has a 'default.nix' detected, we're using it instead. - users = path/to/users.nix; -} ----- - -The resulting attribute set can be easily be used for importing. -Here's an example of a NixOS system created with the modules which can used for shared configuration between hosts. - -[source, nix] ----- -lib.nixosSystem { - system = "x86_64-linux"; - modules = lib.mapAttrsToList (name: path: import path) (lib.filesToAttr ./modules); -} ----- -