Skip to content

developer: add a developer profile example#6

Open
rlahfa-dinum wants to merge 1 commit into
mainfrom
developer-example
Open

developer: add a developer profile example#6
rlahfa-dinum wants to merge 1 commit into
mainfrom
developer-example

Conversation

@rlahfa-dinum

Copy link
Copy Markdown
Contributor

This adds an example on how to use the developer profile.

The rationale for not pursuing an approach by importing developer/ as needed is the following: the user inventory file has special requirements due to limitations in Sécurix's code (that can be lifted in exchange of more complexity inside the code). These requirements prevent us to write something like:

{ bureautixModulesPath, lib, ... }: {
   securix.self.user = { ... };
   imports = [ "${bureautixModulesPath}/developer" ];
}

which would have been an idiomatic way to some extent to do it.

Instead, we pick the path of least resistance (and also very simple to reason about at scale): a developer profile is always imported, disabled by default and gated behind the module system. User inventories can turn on the flag to become developers, this is what is done.

Comment thread developer/default.nix

imports = [
# This allows a developer to spawn his own virtual machines and do his own things.
./virtualisation.nix

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

si je veux importer plusieurs fichiers pour faire la config dev, je vais devoir faire "config = mkIf config.bureautix.developer.enable {" dans chaque fichier ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oui, il faudra faire ça dans chaque fichier, il n'est pas possible d'importer conditionnellement des fichiers dans le module system.

Si on veut faire ça, on doit exposer un "méta flag" développeur et ça complexifera d'autres choses.

Comment thread developer/virtualisation.nix
Comment thread inventory/users/heloise.nix Outdated
Signed-off-by: Ryan Lahfa <ryan.lahfa@numerique.gouv.fr>
@rlahfa-dinum

Copy link
Copy Markdown
Contributor Author

@jdauphant-dinum Changement requis, fait, je te laisse me dire si ça te convient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants