You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.2 KiB
Nix
55 lines
1.2 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
inherit (lib) mkIf mkMerge mkThenElse;
|
|
annuaire = config.r6d.machines;
|
|
currentMachine = annuaire."${config.networking.fqdn}";
|
|
flags = currentMachine.configurationFlags;
|
|
in
|
|
# TODO: ménage
|
|
mkIf flags.hydra-builder {
|
|
|
|
# Paquets
|
|
environment.systemPackages = with pkgs; [
|
|
kvm
|
|
qemu
|
|
virtualbox
|
|
];
|
|
|
|
# Services
|
|
|
|
## Services de virtualisation utilisé pour les tests hydra
|
|
virtualisation = {
|
|
docker.enable = true;
|
|
libvirtd = {
|
|
enable = true;
|
|
};
|
|
virtualbox = {
|
|
#guest.enable = true;
|
|
host.enable = true;
|
|
host.headless = true;
|
|
};
|
|
};
|
|
|
|
## Ménage automatique tous les jours - Frequent garbage collection is a good idea for build machines.
|
|
nix.gc = {
|
|
automatic = true;
|
|
dates = "*:0/30";
|
|
};
|
|
|
|
# users.users."hydrabld" = {
|
|
# description = "Execution des jobs hydra";
|
|
# group = "nixbld";
|
|
# extraGroups = [
|
|
# "docker"
|
|
# "nixbld"
|
|
# "vboxusers"
|
|
# ];
|
|
# isNormalUser = true; # devrait être à false: TODO débugger la conf ssh & users pour que ça marche en user système
|
|
|
|
# openssh.authorizedKeys.keys = [
|
|
# "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGYpjcWJCf8dXpv2LmoIaNVbwZXEC50QUU6Az+lqeD89 hydra radx"
|
|
# ];
|
|
# };
|
|
}
|