treewide: assertions at top of config
Moving assertions to be consistently at top of the config blocks. Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
parent
0b44044694
commit
9a5042a88c
9 changed files with 92 additions and 92 deletions
|
|
@ -484,6 +484,13 @@ in
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = ((filter (b: (lib.length (lib.toList b.map)) == 0) (cfg.binds ++ cfg.macros)) == [ ]);
|
||||
message = "The 'programs.neomutt.(binds|macros).map' list must contain at least one element.";
|
||||
}
|
||||
];
|
||||
|
||||
home.packages = [ cfg.package ];
|
||||
home.file =
|
||||
let
|
||||
|
|
@ -541,13 +548,6 @@ in
|
|||
);
|
||||
};
|
||||
|
||||
assertions = [
|
||||
{
|
||||
assertion = ((filter (b: (lib.length (lib.toList b.map)) == 0) (cfg.binds ++ cfg.macros)) == [ ]);
|
||||
message = "The 'programs.neomutt.(binds|macros).map' list must contain at least one element.";
|
||||
}
|
||||
];
|
||||
|
||||
warnings =
|
||||
let
|
||||
hasOldBinds = binds: (filter (b: !(lib.isList b.map)) binds) != [ ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue