From 12ec2b44b056a6394d5b1e0431a74faf7bb3a853 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Tue, 27 Aug 2024 22:55:22 +0200 Subject: [PATCH] Document module overriding --- README.md | 27 +++++++++++++++++++++++++++ lib/default.nix | 8 ++++---- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ba5b930..5f2681b 100644 --- a/README.md +++ b/README.md @@ -111,9 +111,36 @@ Here is a minimal required configuration.nix (the TODOs mention a required chang }; } ``` + ## First Login + After logging in the first time, your password will be set to "firstlogin", please change this to whatever you like. +## Modules + +You can add additional modules or remove all of them by overriding parameters to the build_systems command: + +```nix +nixosConfigurations = + let + additionalMods = { + nixos = [ + # your modules + ]; home = [ + # your modules + ]; + } + # passing this parameter will override the existing modules + mods = { + nixos = []; + home = []; + } + in + (inputs.dashNix.dashNixLib.build_systems [ + "system1" + ] ./. mods additionalMods); +``` + # Modules This configuration features several modules that can be used as preconfigured "recipies". diff --git a/lib/default.nix b/lib/default.nix index 777af7a..c50257b 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,6 +1,10 @@ { inputs, pkgs, + additionalMods ? { + nixos = [ ]; + home = [ ]; + }, mods ? { nixos = [ inputs.home-manager.nixosModules.home-manager @@ -26,10 +30,6 @@ ../modules ]; }, - additionalMods ? { - nixos = [ ]; - home = [ ]; - }, ... }: {