{
  options,
  config,
  lib,
  ...
}:
with lib;
with lib.frajul; let
  cfg = config.hardware.networking;
in {
  options.hardware.networking = with types; {
    enable = mkBoolOpt false "Enable networkmanager";
  };

  config = mkIf cfg.enable {
    networking.networkmanager.enable = true;
    environment.persist.directories = [
      "/etc/NetworkManager"
    ];
  };
}
