1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-02 23:21:02 +01:00

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:
Austin Horstman 2025-11-22 14:50:05 -06:00
parent 0b44044694
commit 9a5042a88c
9 changed files with 92 additions and 92 deletions

View file

@ -219,6 +219,13 @@ in
};
config = mkIf cfg.enable {
assertions = [
{
assertion = cfg.extraPackages != [ ] -> cfg.package != null;
message = "{option}programs.zed-editor.extraPackages requires non null {option}programs.zed-editor.package";
}
];
home.packages = mkIf (cfg.package != null) (
if cfg.extraPackages != [ ] then
[
@ -307,12 +314,5 @@ in
"zed/debug.json".source = jsonFormat.generate "zed-user-debug" cfg.userDebug;
})
];
assertions = [
{
assertion = cfg.extraPackages != [ ] -> cfg.package != null;
message = "{option}programs.zed-editor.extraPackages requires non null {option}programs.zed-editor.package";
}
];
};
}