tree-wide: use lib.hm.assertions.assertPlatform

This commit is contained in:
Benedikt Rips
2026-01-03 22:09:33 +01:00
committed by Robert Helgesson
parent 1cfa305fba
commit c211298f7e
2 changed files with 2 additions and 8 deletions

View File

@@ -66,10 +66,7 @@ in
config = lib.mkIf cfg.enable {
assertions = [
{
assertion = pkgs.stdenv.hostPlatform.isLinux;
message = "niriswitcher is only available on Linux.";
}
(lib.hm.assertions.assertPlatform "programs.niriswitcher" pkgs lib.platforms.linux)
];
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];

View File

@@ -430,10 +430,7 @@ in
# Do not install any user services if username is root.
config = mkIf (cfg.enable && config.home.username != "root") {
assertions = [
{
assertion = pkgs.stdenv.isLinux;
message = "This module is only available on Linux.";
}
(lib.hm.assertions.assertPlatform "systemd" pkgs lib.platforms.linux)
];
xdg.configFile = mkMerge [