I have a module that basically looks like this.
{ pkgs, lib, config, ... }:
with config.settings;
let
cfg = config.my.foo;
in {
options = with lib; {
my.foo = {
enable = mkEnableOption ''
Whether to enable foo module
'';
};
};
config = with lib;
mkIf cfg.enable (mkMerge [
(mkIf pkgs.stdenv.isDarwin {
launchd.user.agents."foo" = {
# some config
};
})
(mkIf pkgs.stdenv.isLinux {
# nixos config
})
]);
}
The problem is when I run my setup on NixOS I get the following error
The option 'lanuchd' does not exist.
I thought that it would be enough to check the platform, but looks like this is not enough?