From e8b5f05bfde272bdbda7bdbf2f034c00e0751fe8 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Mon, 6 Dec 2021 17:57:54 +0800 Subject: [PATCH] Update flakes and documentations --- .gitmodules | 2 +- README.adoc | 4 ++-- flake.lock | 30 +++++++++++++++--------------- modules/README.adoc | 17 +++++++++++++---- 4 files changed, 31 insertions(+), 22 deletions(-) diff --git a/.gitmodules b/.gitmodules index 3fc6497a..f2afdac1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "users/config"] - path = users/foo-dogsquared/config + path = users/home-manager/foo-dogsquared/config url = https://github.com/foo-dogsquared/dotfiles.git diff --git a/README.adoc b/README.adoc index 02ed8d22..43adbaa3 100644 --- a/README.adoc +++ b/README.adoc @@ -46,9 +46,8 @@ nixos-config This usually configures like the hardware setup, timezone, and users. Host configurations are also exported in the flakes in `outputs.nixosConfigurations`. -* link:./modules/[`./modules/`] contain my custom modules including for NixOS and home-manager. +* link:./modules/[`./modules/`] contain my custom modules including NixOS and home-manager modules. For more information, see the link:./modules/README.adoc[related documentation]. -It is also exported from the flake in `outputs.nixosModules`. * link:./pkgs/[`./pkgs/`] contains my custom packages. It is exported in the flakes at `outputs.packages` compiled through various systems (but only `x86_64-linux` is mainly tested). @@ -66,6 +65,7 @@ In order of priority: * [x] Create custom modules. * [x] Create a themes system similar to link:https://github.com/hlissner/dotfiles[this NixOS config]. +* [ ] Create development shells. * [x] Manage secrets with agenix. * [ ] Create link:https://github.com/numtide/devshell[devshells]. * [x] Automate backups with NixOS config. diff --git a/flake.lock b/flake.lock index 54f22b69..f7304e1b 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1638319138, - "narHash": "sha256-ve33f4nTKQluyvm5URQwL019x0Fnrg8urqzvymNeD+s=", + "lastModified": 1638748414, + "narHash": "sha256-5lII/CiiO1tobd92RMpVcwDAWVdpIvQdHCMT9kLRtk0=", "owner": "ryantm", "repo": "agenix", - "rev": "52ea2f8c3231cc2b5302fa28c63588aacb77ea29", + "rev": "c53ac31e44285ef77f239cc985aa43c03533172f", "type": "github" }, "original": { @@ -81,11 +81,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1638653427, - "narHash": "sha256-4GjEJ3skxI7qrdh75bDfsmHo7QHkWWDo3waQ3Hotej4=", + "lastModified": 1638765202, + "narHash": "sha256-eW/ZDUrfP8rD8a5Rotqo8i5PKiK7UFWe75DgMLAtenY=", "owner": "neovim", "repo": "neovim", - "rev": "1e6eeca9d1360554ee18525603e83c3a1999a622", + "rev": "523f03b506bf577811c0e136bc852cdb89f92c00", "type": "github" }, "original": { @@ -102,11 +102,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1638692002, - "narHash": "sha256-qA5erdDRylHAdbWcSaa5MLQi5T7lwlNOcglvNt2GMbY=", + "lastModified": 1638778450, + "narHash": "sha256-C5UoHcRk5YjKNz9bVv+Kp28PjT/A+R49rUlpa1hFxvU=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "ccbfeaac2c0b0cae2ab48a1dca49cba4f4ac9b8c", + "rev": "740f1503ca2e5c066507e836bac13aa21c87da3b", "type": "github" }, "original": { @@ -117,11 +117,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1638376152, - "narHash": "sha256-ucgLpVqhFnClH7YRUHBHnmiOd82RZdFR3XJt36ks5fE=", + "lastModified": 1638535497, + "narHash": "sha256-tk5LNbdkUhALp00+r5ZmQ3t7n2d5M7YUQB+MznWvVOg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6daa4a5c045d40e6eae60a3b6e427e8700f1c07f", + "rev": "c71f061c68ba8ce53471b767d5049cbd0f3d8490", "type": "github" }, "original": { @@ -133,11 +133,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1638432899, - "narHash": "sha256-iZ+rgyRx3JVyylXYxSyW01liDWEn+O8cKnin6cMzOFU=", + "lastModified": 1638671387, + "narHash": "sha256-xjxuLNcbwoGU9UXuEbbsYigVDXANOI+09nlMTUAtxLQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "56cbe42f1668338d05febfbb866e32f2c865609a", + "rev": "5a1f29a6574d5086cc6d97c2ab1eea4d0302ab94", "type": "github" }, "original": { diff --git a/modules/README.adoc b/modules/README.adoc index 0249aed9..ad668050 100644 --- a/modules/README.adoc +++ b/modules/README.adoc @@ -1,8 +1,7 @@ = Modules :toc: -These are the modules to be used for the system configuration. -Multiple types of modules can be found here but the usual types of modules you'll be paying attention is the modules for link:https://nixos.org/manual/nixos/stable/index.html#sec-writing-modules[NixOS modules] and home-manager, both in link:./nixos/[`./nixos/`] and link:./home-manager/[`./home-manager/`], respectively. +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.) @@ -11,7 +10,7 @@ For example, take the following module folder structure... [source, tree] ---- -system/ +nixos/ ├── themes/ │   ├── a-happy-gnome/ │   │   ├── default.nix @@ -51,7 +50,7 @@ system/ ---- The resulting attribute set can be easily be used for importing. -Here's an example of a NixOS system created with the NixOS modules which can used for shared configuration between hosts. +Here's an example of a NixOS system created with the custom NixOS modules (i.e., link:./nixos/[`./nixos/`]) which can used for shared configuration between hosts. [source, nix] ---- @@ -60,3 +59,13 @@ lib.nixosSystem { modules = lib.mapAttrsToList (name: path: import path) (lib.filesToAttr ./modules/nixos); } ---- + + + + +== Flake outputs + +Various modules are then exported to the project flake as the following output: + +* `nixosModules` exports modules from link:./nixos/[`./nixos/`]. +* `homeManagerModules` exports modules from link:./home-manager/[`./home-manager/`].