Nixos equivalent for xhost si:localuser:root

Is there an equivalent addition to nixos config.nix, so that you don’t have to add this command at every system start?

xhost si:localuser:root

Maybe somewhere around xserver.extraConfig or services.xserver.displayManager.sessionCommands you should find the right option.

1 Like