Skip to content

Managing local dns (/etc/hosts) & development certificates #27

@blaggacao

Description

@blaggacao

https://github.com/guumaster/hostctl is a great tool for manipulating local /etc/hosts for development.

But it also defies the very principles of isolated devshell environments.

The way it usually works is:

  • a .etchosts file checked into version control
  • this is then loaded with sudo $(which hostctl) add $profilename --from .etchosts
  • and removed with sudo $(which hostctl) remove $profilename

It also can be activated and deactivated, once loaded, with:

  • ... enable
  • ... disable

But those latter commands seem more useful for interactive usage for special requirements or temporary profile switches, and are not relevant to the genuine setup of a devshell.

Though in order to accommodate for this local /etc/hosts management through devshell, I think two things would have to be achieved.

  • acquire sudo privileges during setup (well... 😉 I'm already running away)
  • provide finalizer hooks

Or take a completely other approach, like: https://github.com/bAndie91/libnss_homehosts (at least for nixos users that might be a hidden goodie, if packaged there)

Or just acknowledge it would be cool, but no thanks! Too complicated. 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions