Compare commits

..

10 Commits

75 changed files with 167 additions and 114 deletions

View File

@@ -23,6 +23,9 @@ full-auto: submodules-update upgrade clean optimise
optimise:
$(TIME) nix-store --optimise
rebuild-build:
$(TIME) time nixos-rebuild build --fallback --show-trace
rebuild-switch:
$(TIME) time nixos-rebuild switch --fallback --show-trace

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.graphical {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf currentMachine.profiles.isDesktopEnvironment {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf (flags.officeSuite && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf (flags.conception-assistee && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf (flags.cartographie && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
# TODO: ménage
mkIf (flags.internetSuite && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf (true && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
#inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
{

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf (flags.developpement-elm && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf (flags.developpement-haskell && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf (flags.developpement-java && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf (flags.jetbrains-licensed && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf (flags.developpement-rust && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf (flags.developpement && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf (flags.edition-musique && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf (flags.edition-photo && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf (flags.edition-video && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf (flags.jeux && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
# TODO ranger le spécifique pulseaudio

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf (true && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf (flags.securitySuite && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf true {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf true {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.officeSuite {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.conception-assistee {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.cartographie {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
# TODO: ménage
mkIf flags.internetSuite {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf true {

View File

@@ -4,7 +4,7 @@ let
#inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
{

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.developpement-elm {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.developpement-haskell {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.developpement-java {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.jetbrains-licensed {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.developpement-rust {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.developpement {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.edition-musique {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.edition-photo {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.edition-video {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.jeux {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.multimediaSuite {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf true {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.securitySuite {

View File

@@ -8,7 +8,7 @@ let
host = config.networking.hostName;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
{
@@ -56,26 +56,6 @@ in
};
})
## Profils liés à Dubronetwork
(mkIf (pfl.isDubronetwork && pfl.isWorkstation) {
r6d.config-generator = {
cartographie = true;
conception-assistee = true;
docker = true;
developpement = true;
developpement-elm = true;
developpement-haskell = true;
developpement-java = true;
developpement-rust = true;
edition-musique = true;
edition-photo = true;
edition-video = true;
scanner = true;
virtualbox = true;
xmonad = true;
};
})
## Affectation des profils aux machines
(mkIf comp.isLatitude {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.auto-upgrade {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
# TODO: rc.lua par défaut (système)

View File

@@ -4,7 +4,7 @@ let
#inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
{

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
# TODO: ménage

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.laptop {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf true {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf true {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf true {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.swap {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf false {

50
lib.nix Normal file
View File

@@ -0,0 +1,50 @@
let
lib = with import <nixpkgs> {}; pkgs.lib;
profiles = {
isDesktopEnvironment = {
awesome = true;
internetSuite = true;
graphical = true;
multimediaSuite = true;
officeSuite = true;
pulseaudio = true;
securitySuite = true;
};
isWorkstation = {
docker = true;
developpement = true;
developpement-elm = true;
developpement-haskell = true;
developpement-java = true;
developpement-rust = true;
};
#isServer = {
#};
};
in
with lib; rec{
# Apply the profiles (pre-defined + custom) to the whole directory
applyProfilesToDirectory = customProfiles: directory:
lib.mapAttrs (applyProfilesToMachine customProfiles) directory;
# Apply the profiles (pre-defined + custom) to a machine
applyProfilesToMachine = customProfiles: machineName: machineOptions:
{ configurationFlags = lib.recursiveUpdate (generateFlagsSet customProfiles machineOptions.profiles) machineOptions.configurationFlags;
configurationOptions = machineOptions.configurationOptions;
profiles = machineOptions.profiles;
};
# Generate a set of configuration flags based on profiles
generateFlagsSet = customProfiles: machineProfiles:
let
allProfiles = recursiveUpdate profiles customProfiles;
conditionalFlags = name: value:
if machineProfiles.${name}
then value
else {};
in
foldr (a: b: a // b) {} (mapAttrsToList conditionalFlags allProfiles);
}

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf true {

View File

@@ -6,7 +6,7 @@ let
machineOptions = types.submodule {
options = {
configuration-flags = {
configurationFlags = {
#enable = mkEnableOption "Génération de la configuration d'une machine.";
awesome = mkEnableOption "Profil pour activer le gestionnaire de fenêtre awesome.";
auto-upgrade = mkEnableOption "Profil pour activer les mises à jour automatiques.";
@@ -57,15 +57,7 @@ let
znc = mkEnableOption "Profil pour activer le relais IRC ZNC.";
};
profiles = {
# Domaine
isDubronetwork = mkEnableOption "Pour distinguer les machines dubronetwork.";
isPrunetwork = mkEnableOption "Pour distinguer les machines prunetwork.";
# Utilisation machine
isDesktopEnvironment = mkEnableOption "Pour indiquer une machine avec interface graphique.";
isServer = mkEnableOption "Pour indiquer qu'il s'agit d'un serveur.";
isWorkstation = mkEnableOption "Pour indiquer que la machine sert à travailler.";
};
configurationOptions = {
ipAddress = mkOption {
description = "Adresse IP";
@@ -128,11 +120,24 @@ let
};
};
};
profiles = {
# Domaine
isDubronetwork = mkEnableOption "Pour distinguer les machines dubronetwork.";
isDubronetworkWorkstation = mkEnableOption "Pour distinguer les machines dubronetwork avec Workstation.";
isPrunetwork = mkEnableOption "Pour distinguer les machines prunetwork.";
isPrunetworkWorkstation = mkEnableOption "Pour distinguer les machines prunetwork avec Workstation.";
# Utilisation machine
isDesktopEnvironment = mkEnableOption "Pour indiquer une machine avec interface graphique.";
isServer = mkEnableOption "Pour indiquer qu'il s'agit d'un serveur.";
isWorkstation = mkEnableOption "Pour indiquer que la machine sert à travailler.";
};
};
};
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
{
@@ -151,10 +156,15 @@ in
*/
assertions = [
{
assertion = (currentMachine.profiles.isWorkstation && (currentMachine.profiles.isDesktopEnvironment == true))
|| (!currentMachine.profiles.isWorkstation);
assertion = (currentMachine.profiles.isWorkstation && (currentMachine.configurationFlags.graphical == true))
|| (!currentMachine.profiles.isWorkstation);
message = "A workstation requires a graphical environement.";
}
{
assertion = (currentMachine.profiles.isDesktopEnvironment && (currentMachine.configurationFlags.graphical == true))
|| (!currentMachine.profiles.isDesktopEnvironment);
message = "A desktop station requires a graphical environement.";
}
{
assertion = (currentMachine.profiles.isDesktopEnvironment && (config.services.xserver.enable == true))
|| (!currentMachine.profiles.isDesktopEnvironment);

View File

@@ -4,7 +4,7 @@ let
#inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
{

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.docker {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.elasticsearch {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf true {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.developpement-haskell {

View File

@@ -4,29 +4,39 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
# TODO: ménage
mkIf flags.hydra-builder {
# Paquets
environment.systemPackages = with pkgs; [
qemu
kvm
qemu
virtualbox
];
# Services
## Services de virtualisation utilisé pour les tests hydra
virtualisation.docker.enable = true;
virtualisation.libvirtd.enable = true;
virtualisation.libvirtd.enableKVM = true;
#virtualisation.virtualbox.guest.enable = true;
virtualisation.virtualbox.host.enable = true;
virtualisation.virtualbox.host.headless = true;
virtualisation = {
docker.enable = true;
libvirtd = {
enable = true;
enableKVM = true;
};
virtualbox = {
#guest.enable = true;
host.enable = true;
host.headless = true;
};
};
## Ménage automatique tous les jours
nix.gc.automatic = 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";

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
#### https://github.com/NixOS/hydra/issues/413

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.kibana {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.locate {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
# TODO: changer adresse mail

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.print {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.pulseaudio {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.scanner {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf true {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.virtualbox {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
/**

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.xmonad {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf true {