mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 09:29:41 +08:00
tree-wide: use lib.hm.assertions.assertPlatform
This commit is contained in:
committed by
Robert Helgesson
parent
1cfa305fba
commit
c211298f7e
@@ -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 ];
|
||||
|
||||
@@ -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 [
|
||||
|
||||
Reference in New Issue
Block a user