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
|
|
@ -30,12 +30,12 @@ in
|
|||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
assertions = [
|
||||
(lib.hm.assertions.assertPlatform "services.kdeconnect" pkgs lib.platforms.linux)
|
||||
];
|
||||
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
systemd.user.services.kdeconnect = {
|
||||
Unit = {
|
||||
Description = "Adds communication between your desktop and your smartphone";
|
||||
|
|
|
|||
|
|
@ -704,20 +704,6 @@ in
|
|||
|
||||
config = mkIf cfg.enable (
|
||||
lib.mkMerge [
|
||||
(mkIf (cfg.config != null) {
|
||||
warnings =
|
||||
(optional (lib.isList cfg.config.fonts) "Specifying sway.config.fonts as a list is deprecated. Use the attrset version instead.")
|
||||
++ lib.flatten (
|
||||
map (
|
||||
b:
|
||||
optional (lib.isList b.fonts) "Specifying sway.config.bars[].fonts as a list is deprecated. Use the attrset version instead."
|
||||
) cfg.config.bars
|
||||
)
|
||||
++ [
|
||||
(mkIf cfg.config.focus.forceWrapping "sway.config.focus.forceWrapping is deprecated, use focus.wrapping instead.")
|
||||
];
|
||||
})
|
||||
|
||||
{
|
||||
assertions = [
|
||||
(lib.hm.assertions.assertPlatform "wayland.windowManager.sway" pkgs lib.platforms.linux)
|
||||
|
|
@ -753,6 +739,20 @@ in
|
|||
};
|
||||
};
|
||||
}
|
||||
|
||||
(mkIf (cfg.config != null) {
|
||||
warnings =
|
||||
(optional (lib.isList cfg.config.fonts) "Specifying sway.config.fonts as a list is deprecated. Use the attrset version instead.")
|
||||
++ lib.flatten (
|
||||
map (
|
||||
b:
|
||||
optional (lib.isList b.fonts) "Specifying sway.config.bars[].fonts as a list is deprecated. Use the attrset version instead."
|
||||
) cfg.config.bars
|
||||
)
|
||||
++ [
|
||||
(mkIf cfg.config.focus.forceWrapping "sway.config.focus.forceWrapping is deprecated, use focus.wrapping instead.")
|
||||
];
|
||||
})
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue