Should `os` class also deliver `systemManager` configuration?
Open for deliberation, but I think it maybe should. Given that there are already differences in what config can be shared between nixos and nix-darwin, anyone using System Manager in their infra should already be cognizant of the trade-offs.
Here's a drop-in fix for anyone who wants this in the future:
{ den, lib, ... }:
{
# Route `os` class content into systemManager-class hosts as well
den.policies.os-to-system-manager =
{ host, ... }:
lib.optional (host ? class && host.class == "systemManager") (
den.lib.policy.route {
fromClass = "os";
intoClass = "systemManager";
path = [ ];
}
);
den.default.includes = [ den.policies.os-to-system-manager ];
}
Sorry for the slow reply. I'd rather not do this by default. Most os content is NixOS or darwin options, and system-manager would refuse a lot of it, so turning it on would break configs that work today. Your policy is the right shape for opting in. I'd like to fold this into a small change that lets a custom OS class (system-manager included) opt into os routing, since #663 turned up the same gap for custom classes. Until then, your snippet is the way to do it.