I already know how to copy org.gnome.Terminal.desktop from /usr/share/applications to home/username/.local/share/applications and how to add --maximize to the exec line. What I would like some help with is how to do it declaratively with home-manager. I would very much appreciate the help. Thank you.
Use the nixpkgs.overlays
[1] option in home-manager to override the gnome-terminal package to patch in your modified desktop file (you’d use substituteInPlace
for this)
Otherwise, you can easily use home.file
to copy your modified desktop file into .local/share/applications
[2]
[2] Home Manager - Option Search
Thirdly, try inspecting the dconf settings for gnome-terminal and see if there isn’t already a maximize option there, I’m not familiar with gnome-terminal as I use gnome-console. You can use dconf.settings
for this.