mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
wrapper-manager-fds/docs: update menu and user guide
This commit is contained in:
parent
e53cb12836
commit
1bfcf256d5
@ -1,8 +1,14 @@
|
|||||||
|
[[main]]
|
||||||
|
identifier = "user-guide"
|
||||||
|
name = "User guide"
|
||||||
|
url = "user-guide"
|
||||||
|
weight = 1
|
||||||
|
|
||||||
[[main]]
|
[[main]]
|
||||||
identifier = "nix-module-options"
|
identifier = "nix-module-options"
|
||||||
name = "Module options"
|
name = "Module options"
|
||||||
url = "wrapper-manager-env-options/"
|
url = "wrapper-manager-env-options/"
|
||||||
weight = 1
|
weight = 2
|
||||||
|
|
||||||
[[main]]
|
[[main]]
|
||||||
identifier = "source-code"
|
identifier = "source-code"
|
||||||
|
@ -18,6 +18,37 @@ It is comparable to NixOS and home-manager in a way that it compiles into an ope
|
|||||||
Speaking of which, wrapper-manager is meant to be composed in larger-scoped environments such as NixOS and home-manager, mainly by including wrapper-manager packages in `environment.systemPackages` and `home.packages` but you could also make them as a standalone package.
|
Speaking of which, wrapper-manager is meant to be composed in larger-scoped environments such as NixOS and home-manager, mainly by including wrapper-manager packages in `environment.systemPackages` and `home.packages` but you could also make them as a standalone package.
|
||||||
|
|
||||||
|
|
||||||
|
[#getting-started]
|
||||||
|
== Getting started
|
||||||
|
|
||||||
|
But first, we'll have to have wrapper-manager in our configuration.
|
||||||
|
There are multiple ways to do so as already shown from the link:../project-overview#installation[Project overview] so we'll go ahead with what should you do after it.
|
||||||
|
There are multiple ways to build a wrapper-manager package:
|
||||||
|
|
||||||
|
* You can manually build one with `wrapperManagerLib.env.build`.
|
||||||
|
It needs a nixpkgs instance (`pkgs`) and a list of additional modules (`modules`) with an optional attrset of static of module arguments (`specialArgs`).
|
||||||
|
+
|
||||||
|
--
|
||||||
|
Here's an example of using the function.
|
||||||
|
|
||||||
|
[source, nix]
|
||||||
|
----
|
||||||
|
{ pkgs ? import <nixpkgs> { } }:
|
||||||
|
|
||||||
|
let
|
||||||
|
wrapper-manager = import <wrapper-manager-fds> { };
|
||||||
|
wrapperManagerLib = import wrapper-manager.wrapperManagerLib { inherit pkgs; };
|
||||||
|
in
|
||||||
|
wrapperManagerLib.env.build {
|
||||||
|
inherit pkgs;
|
||||||
|
modules = [ ./config/wrapper.nix ];
|
||||||
|
specialArgs = { hello = "WORLD"; };
|
||||||
|
}
|
||||||
|
----
|
||||||
|
|
||||||
|
--
|
||||||
|
|
||||||
|
|
||||||
[#using-wrapper-manager]
|
[#using-wrapper-manager]
|
||||||
== Using wrapper-manager
|
== Using wrapper-manager
|
||||||
|
|
||||||
@ -324,7 +355,7 @@ Here's an example of importing it into a NixOS and home-manager config with flak
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
homeConfigurations.user = homeConfigurations {
|
homeConfigurations.user = homeManagerConfiguration {
|
||||||
modules = [
|
modules = [
|
||||||
inputs.wrapper-manager.homeModules.wrapper-manager
|
inputs.wrapper-manager.homeModules.wrapper-manager
|
||||||
];
|
];
|
||||||
@ -336,6 +367,11 @@ Here's an example of importing it into a NixOS and home-manager config with flak
|
|||||||
For the most part, the integration modules are mostly the same.
|
For the most part, the integration modules are mostly the same.
|
||||||
As an example, you can create wrappers through `wrapper-manager.packages` where it is expected to be an attribute set of wrapper-manager configurations.
|
As an example, you can create wrappers through `wrapper-manager.packages` where it is expected to be an attribute set of wrapper-manager configurations.
|
||||||
|
|
||||||
|
[NOTE]
|
||||||
|
====
|
||||||
|
Any wrapper-manager packages declared through it are automatically added as part of their respective list of packages (e.g., `home.packages` for home-manager, `environment.systemPackages` for NixOS).
|
||||||
|
====
|
||||||
|
|
||||||
[source, nix]
|
[source, nix]
|
||||||
----
|
----
|
||||||
{ lib, config, ... }:
|
{ lib, config, ... }:
|
||||||
|
Loading…
Reference in New Issue
Block a user