From 60513a6f40d69e9c09b11ff009ab95b12dabbf0c Mon Sep 17 00:00:00 2001 From: rycee Date: Sun, 7 May 2023 10:45:07 +0000 Subject: [PATCH] deploy: 990b82ecd31f6372bc4c3f39a9171961bc370a22 --- index.html | 106 +++++++++++++++++++++++++-------------------------- options.html | 13 ++++++- 2 files changed, 65 insertions(+), 54 deletions(-) diff --git a/index.html b/index.html index 00c7ce100..b0f2860f5 100644 --- a/index.html +++ b/index.html @@ -460,111 +460,111 @@ Indicates that value must be placed

would place c before b and after a in the graph.

-hm.types.gvariant +hm.types.gvariant

-This type is useful for options representing GVariant values. The type accepts all primitive GVariant types as well as arrays and tuples. Dictionaries are not currently supported. -

To create a GVariant value you can use a number of provided functions. Examples assume an option foo.bar of type hm.types.gvariant.

-hm.gvariant.mkBoolean (v: bool) +This type is useful for options representing GVariant values. The type accepts all primitive GVariant types as well as arrays, tuples, “maybe” types, and dictionaries. +

Some Nix values are automatically coerced to matching GVariant value but the GVariant model is richer so you may need to use one of the provided constructor functions. Examples assume an option foo.bar of type hm.types.gvariant.

+hm.gvariant.mkBoolean (v: bool)

-Takes a Nix value v to a GVariant boolean value. Note, Nix booleans are automatically coerced using this function. That is, +Takes a Nix value v to a GVariant boolean value (GVariant format string b). Note, Nix booleans are automatically coerced using this function. That is,

foo.bar = hm.gvariant.mkBoolean true;

is equivalent to

foo.bar = true;
-hm.gvariant.mkString (v: string) +hm.gvariant.mkString (v: string)

-Takes a Nix value v to a GVariant string value. Note, Nix strings are automatically coerced using this function. That is, +Takes a Nix value v to a GVariant string value (GVariant format string s). Note, Nix strings are automatically coerced using this function. That is,

foo.bar = hm.gvariant.mkString "a string";

is equivalent to

foo.bar = "a string";
-hm.gvariant.mkObjectpath (v: string) +hm.gvariant.mkObjectpath (v: string)
-Takes a Nix value v to a GVariant objectpath value. +Takes a Nix value v to a GVariant objectpath value (GVariant format string o).
-hm.gvariant.mkUchar (v: string) +hm.gvariant.mkUchar (v: string)
-Takes a Nix value v to a GVariant uchar value. +Takes a Nix value v to a GVariant uchar value (GVariant format string y).
-hm.gvariant.mkInt16 (v: int) +hm.gvariant.mkInt16 (v: int)
-Takes a Nix value v to a GVariant int16 value. +Takes a Nix value v to a GVariant int16 value (GVariant format string n).
-hm.gvariant.mkUint16 (v: int) +hm.gvariant.mkUint16 (v: int)
-Takes a Nix value v to a GVariant uint16 value. +Takes a Nix value v to a GVariant uint16 value (GVariant format string q).
-hm.gvariant.mkInt32 (v: int) +hm.gvariant.mkInt32 (v: int)

-Takes a Nix value v to a GVariant int32 value. Note, Nix integers are automatically coerced using this function. That is, +Takes a Nix value v to a GVariant int32 value (GVariant format string i). Note, Nix integers are automatically coerced using this function. That is,

foo.bar = hm.gvariant.mkInt32 7;

is equivalent to

foo.bar = 7;
-hm.gvariant.mkUint32 (v: int) +hm.gvariant.mkUint32 (v: int)
-Takes a Nix value v to a GVariant uint32 value. +Takes a Nix value v to a GVariant uint32 value (GVariant format string u).
-hm.gvariant.mkInt64 (v: int) +hm.gvariant.mkInt64 (v: int)
-Takes a Nix value v to a GVariant int64 value. +Takes a Nix value v to a GVariant int64 value (GVariant format string x).
-hm.gvariant.mkUint64 (v: int) +hm.gvariant.mkUint64 (v: int)
-Takes a Nix value v to a GVariant uint64 value. +Takes a Nix value v to a GVariant uint64 value (GVariant format string t).
-hm.gvariant.mkDouble (v: double) +hm.gvariant.mkDouble (v: double)

-Takes a Nix value v to a GVariant double value. Note, Nix floats are automatically coerced using this function. That is, +Takes a Nix value v to a GVariant double value (GVariant format string d). Note, Nix floats are automatically coerced using this function. That is,

foo.bar = hm.gvariant.mkDouble 3.14;

is equivalent to

foo.bar = 3.14;
-hm.gvariant.mkArray type elements +hm.gvariant.mkArray type elements

-Builds a GVariant array containing the given list of elements, where each element is a GVariant value of the given type. The type value can be constructed using +Builds a GVariant array containing the given list of elements, where each element is a GVariant value of the given type (GVariant format string a${type}). The type value can be constructed using

  • -hm.gvariant.type.string +hm.gvariant.type.string (GVariant format string s)
  • -hm.gvariant.type.boolean +hm.gvariant.type.boolean (GVariant format string b)
  • -hm.gvariant.type.uchar +hm.gvariant.type.uchar (GVariant format string y)
  • -hm.gvariant.type.int16 +hm.gvariant.type.int16 (GVariant format string n)
  • -hm.gvariant.type.uint16 +hm.gvariant.type.uint16 (GVariant format string q)
  • -hm.gvariant.type.int32 +hm.gvariant.type.int32 (GVariant format string i)
  • -hm.gvariant.type.uint32 +hm.gvariant.type.uint32 (GVariant format string u)
  • -hm.gvariant.type.int64 +hm.gvariant.type.int64 (GVariant format string x)
  • -hm.gvariant.type.uint64 +hm.gvariant.type.uint64 (GVariant format string t)
  • -hm.gvariant.type.double +hm.gvariant.type.double (GVariant format string d)
  • -hm.gvariant.type.variant +hm.gvariant.type.variant (GVariant format string v)
  • -hm.gvariant.type.arrayOf type +hm.gvariant.type.arrayOf type (GVariant format string a${type})
  • -hm.gvariant.type.maybeOf type +hm.gvariant.type.maybeOf type (GVariant format string m${type})
  • -hm.gvariant.type.tupleOf types +hm.gvariant.type.tupleOf types (GVariant format string (${lib.concatStrings types}))
  • -hm.gvariant.type.dictionaryEntryOf types +hm.gvariant.type.dictionaryEntryOf [keyType valueType] (GVariant format string {${keyType}${valueType}})

where type and types are themselves a type and list of types, respectively.

-hm.gvariant.mkEmptyArray type +hm.gvariant.mkEmptyArray type
-An alias of hm.gvariant.mkArray type []. +An alias of hm.gvariant.mkArray type [].
-hm.gvariant.mkNothing type +hm.gvariant.mkNothing type
-Builds a GVariant maybe value whose (non-existent) element is of the given type. The type value is constructed as described for the mkArray function above. +Builds a GVariant maybe value (GVariant format string m${type}) whose (non-existent) element is of the given type. The type value is constructed as described for the mkArray function above.
-hm.gvariant.mkJust element +hm.gvariant.mkJust element
-Builds a GVariant maybe value containing the given GVariant element. +Builds a GVariant maybe value (GVariant format string m${element.type}) containing the given GVariant element.
-hm.gvariant.mkTuple elements +hm.gvariant.mkTuple elements
Builds a GVariant tuple containing the given list of elements, where each element is a GVariant value.
-hm.gvariant.mkVariant element +hm.gvariant.mkVariant element
-Builds a GVariant variant which contains the value of a GVariant element. +Builds a GVariant variant (GVariant format string v) which contains the value of a GVariant element.
-hm.gvariant.mkDictionaryEntry elements +hm.gvariant.mkDictionaryEntry [key value]
-Builds a GVariant dictionary entry containing the given list of elements, where each element is a GVariant value. +Builds a GVariant dictionary entry containing the given list of elements (GVariant format string {${key.type}${value.type}}), where each element is a GVariant value.

Chapter 5. Contributing

Contributions to Home Manager are very welcome. To make the process as smooth as possible for both you and the Home Manager maintainers we provide some guidelines that we ask you to follow. See Section 5.1, “Getting started” for information on how to set up a suitable development environment and Section 5.2, “Guidelines” for the actual guidelines.

This text is mainly directed at those who would like to make code contributions to Home Manager. If you just want to report a bug then first look among the already open issues, if you find one matching yours then feel free to comment on it to add any additional information you may have. If no matching issue exists then go to the new issue page and write a description of your problem. Include as much information as you can, ideally also include relevant excerpts from your Home Manager configuration.

5.1. Getting started

If you have not previously forked Home Manager then you need to do that first. Have a look at GitHub’s Fork a repo for instructions on how to do this.

Once you have a fork of Home Manager you should create a branch starting at the most recent master branch. Give your branch a reasonably descriptive name. Commit your changes to this branch and when you are happy with the result and it fulfills Section 5.2, “Guidelines” then push the branch to GitHub and create a pull request.

Assuming your clone is at $HOME/devel/home-manager then you can make the home-manager command use it by either

  1. overriding the default path by using the -I command line option:

    $ home-manager -I home-manager=$HOME/devel/home-manager

    or, if using flakes:

    $ home-manager --override-input home-manager ~/devel/home-manager

    or

  2. diff --git a/options.html b/options.html index a1e20490d..64c612bf4 100644 --- a/options.html +++ b/options.html @@ -624,7 +624,18 @@ path may be overridden on a per-account basis.

    relative path, in which case it is relative the home directory.

    Type: string

    Default: "$HOME/Maildir"

    Declared by:

    <home-manager/modules/accounts/email.nix> -
    dconf.settings

    Settings to write to the dconf configuration system.

    Type: attribute set of attribute set of (GVariant value)

    Default: { }

    Example:

    {
    +                
    dconf.settings

    Settings to write to the dconf configuration system. +

    +Note that the database is strongly-typed so you need to use the same types +as described in the GSettings schema. For example, if an option is of type +uint32 (u), you need to wrap the number +using the lib.hm.gvariant.mkUint32 constructor. +Otherwise, since Nix integers are implicitly coerced to int32 +(i), it would get stored in the database as such, and GSettings +might be confused when loading the setting. +

    +You might want to use dconf2nix +to convert dconf database dumps into compatible Nix expression.

    Type: attribute set of attribute set of (GVariant value)

    Default: { }

    Example:

    {
       "org/gnome/calculator" = {
         button-mode = "programming";
         show-thousands = true;