GNU Emacs modifier keys on MacOS

A few months ago I have started on a new job, and along with the huge excitement came a brand new Mac Mini M4. It's a extremely beautiful and powerful machine, but... after more than a decade on Linux, everything beyond its terminal feels a bit alien.

OK, I had to tweak a few knobs to have they keyboard working as before, however I was extremely surprised that Home Manager and GNU Emacs worked straight out of the box.

(if (eq system-type 'darwin)
      (setq mac-command-modifier      'meta
	    mac-option-modifier       'alt
	    mac-function-modifier     'control
	    mac-right-option-modifier 'alt))