Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions common/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@

# Laptop: power optimizations, etc.
./laptop.nix

# Allow the developer profile which is disabled by default.
../developer
];

securix.self.machine = {
Expand Down
7 changes: 6 additions & 1 deletion developer/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# SPDX-FileCopyrightText: 2025 Ryan Lahfa <ryan.lahfa@numerique.gouv.fr>
#
# SPDX-License-Identifier: MIT

{ lib, ... }:
let
inherit (lib) mkEnableOption;
in
{
options.bureautix.developer.enable = mkEnableOption "the developer profile";

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.

Expand Down
33 changes: 20 additions & 13 deletions developer/virtualisation.nix
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
# SPDX-FileCopyrightText: 2025 Ryan Lahfa <ryan.lahfa@numerique.gouv.fr>
#
# SPDX-License-Identifier: MIT

{ lib, config, ... }:
let
inherit (lib) mkIf;
in
{
programs.virt-manager.enable = true;
virtualisation = {
libvirtd.enable = true;
config = mkIf config.bureautix.developer.enable {
programs.virt-manager.enable = true;
# NOTE: this does not handle the multi-user.
users.users.${config.securix.self.user.username}.extraGroups = [ "libvirtd" ];
virtualisation = {
libvirtd.enable = true;
Comment thread
rlahfa-dinum marked this conversation as resolved.

# You can choose to allow Docker or Podman or you can tell the developers to install their own distribution
# inside the system and do their thing there!
# docker.enable = true;
# podman.enable = true;
};
# You can choose to allow Docker or Podman or you can tell the developers to install their own distribution
# inside the system and do their thing there!
# docker.enable = true;
# podman.enable = true;
};

environment.systemPackages = [
# distrobox: a wrapper for podman and docker to start your own preferred distribution.
# Useful for developers who are unhappy about NixOS!
];
environment.systemPackages = [
# distrobox: a wrapper for podman and docker to start your own preferred distribution.
# Useful for developers who are unhappy about NixOS!
];
};
}
2 changes: 2 additions & 0 deletions inventory/machines/PC140V35.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@
"heloise"
];
};

bureautix.developer.enable = true;
}
Loading