1
0

remote-login.nix 448 B

12345678910111213141516171819202122232425
  1. { config
  2. , lib
  3. , ...
  4. }:
  5. with lib; let
  6. cfg = config.networking;
  7. remoteLogin = optionalString (cfg.remote-login) ''
  8. systemsetup -setremotelogin on
  9. '';
  10. in
  11. {
  12. options = {
  13. networking.remote-login = mkEnableOption "remote login";
  14. };
  15. config = {
  16. system.activationScripts.networking.text = mkIf cfg.remote-login (mkAfter ''
  17. # enable remote login
  18. echo "enabling remote login..." >&2
  19. ${remoteLogin}
  20. '');
  21. };
  22. }