From 7f87329fcaaa4e67891e1b03e69bb98b21f95495 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Tue, 14 Jan 2020 23:45:18 +0100 Subject: [PATCH] home-environment: use DAG type in `activation` option --- modules/home-environment.nix | 3 ++- tests/lib/types/dag-merge.nix | 2 +- tests/lib/types/list-or-dag-merge.nix | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/home-environment.nix b/modules/home-environment.nix index f12e86d41..836e0b259 100644 --- a/modules/home-environment.nix +++ b/modules/home-environment.nix @@ -7,6 +7,7 @@ let cfg = config.home; dag = config.lib.dag; + dagOf = (import ./lib/types.nix { inherit dag lib; }).dagOf; languageSubModule = types.submodule { options = { @@ -235,8 +236,8 @@ in home.activation = mkOption { internal = true; + type = dagOf types.str; default = {}; - type = types.attrs; description = '' Activation scripts for the home environment. diff --git a/tests/lib/types/dag-merge.nix b/tests/lib/types/dag-merge.nix index c5b884b64..41c8f28b4 100644 --- a/tests/lib/types/dag-merge.nix +++ b/tests/lib/types/dag-merge.nix @@ -23,7 +23,7 @@ in config = { tested = mkMerge [ - { dag.after = dag.entryAnywhere "after"; } + { dag.after = "after"; } { dag.before = dag.entryBefore ["after"] "before"; } { dag.between = dag.entryBetween ["after"] ["before"] "between"; } ]; diff --git a/tests/lib/types/list-or-dag-merge.nix b/tests/lib/types/list-or-dag-merge.nix index 3f4cd0ce5..6ffaa532e 100644 --- a/tests/lib/types/list-or-dag-merge.nix +++ b/tests/lib/types/list-or-dag-merge.nix @@ -25,7 +25,7 @@ in tested = mkMerge [ { dag = [ "k" "l" ]; } { dag = [ "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" ]; } - { dag.after = dag.entryAnywhere "after"; } + { dag.after = "after"; } { dag.before = dag.entryBefore ["after"] "before"; } { dag.between = dag.entryBetween ["after"] ["before"] "between"; } ];