1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 11:39:46 +01:00
home-manager/modules/lib
Naïm Favier 8db712a6a2
types: fix dagOf behaviour with mkIf
This makes definitions like

    home.activation.foo = mkIf false "bar"

work, where previously they would complain about
`home.activation.foobar.data` being used but not defined.

The crucial part is that we don't call `convertAllToDags` in
`dagOf.merge`, because we need to process `mkIf`/`mkMerge` properties
first. So we let `attrEquivalent.merge` do its job normally, but give
it a type `dagEntryOf` that does the conversion.

Ideally this shouldn't require so much boilerplate; I'd like to
implement something like

    types.changeInto dagContentType elemType dagEntryAnywhere

in Nixpkgs.
2022-03-30 23:29:09 +02:00
..
assertions.nix Move platform check into modules 2021-07-18 20:43:22 +02:00
dag.nix lib: remove top-level with lib 2021-10-31 08:50:53 +01:00
default.nix Move platform check into modules 2021-07-18 20:43:22 +02:00
file-type.nix lib: remove top-level with lib 2021-10-31 08:50:53 +01:00
gvariant.nix lib: remove top-level with lib 2021-10-31 08:50:53 +01:00
maintainers.nix i3/sway: improve i3.nix to handle options as list like in sway, adjusted functions for less new-lines (#2314) 2022-03-21 16:52:57 -06:00
shell.nix Apply nixfmt on many files 2020-02-02 01:07:28 +01:00
stdlib-extended.nix lib: add fallback for literalExpression and literalDocBook 2021-10-13 00:16:09 +02:00
strings.nix lib: remove top-level with lib 2021-10-31 08:50:53 +01:00
types-dag.nix types: fix dagOf behaviour with mkIf 2022-03-30 23:29:09 +02:00
types.nix lib: remove top-level with lib 2021-10-31 08:50:53 +01:00
zsh.nix Apply nixfmt on many files 2020-02-02 01:07:28 +01:00