mirror of https://gitlab.crans.org/nounous/nixos
Fix physiques et warning id
parent
fefefa84ea
commit
2641ecf224
18
flake.nix
18
flake.nix
|
|
@ -71,7 +71,7 @@
|
|||
]
|
||||
++ baseModules;
|
||||
}
|
||||
) hosts;
|
||||
) (attrsets.filterAttrs (name: info: !(info.isDebian or false)) hosts);
|
||||
attrs_vm_info = listInfoToAttrs (get_info ./hosts/vm) { isVm = true; };
|
||||
attrs_physique_info = listInfoToAttrs (get_info ./hosts/physiques) { isVm = false; };
|
||||
attrs_all_info = attrs_physique_info // attrs_vm_info;
|
||||
|
|
@ -79,14 +79,14 @@
|
|||
(attrsToNixosSystem ./hosts/vm attrs_all_info attrs_vm_info)
|
||||
// (attrsToNixosSystem ./hosts/physiques attrs_all_info attrs_physique_info)
|
||||
// {
|
||||
cransIso = nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = inputs;
|
||||
modules = [
|
||||
./hosts/iso
|
||||
./modules/crans/locale.nix
|
||||
];
|
||||
};
|
||||
# cransIso = nixosSystem {
|
||||
# system = "x86_64-linux";
|
||||
# specialArgs = inputs;
|
||||
# modules = [
|
||||
# ./hosts/iso
|
||||
# ./modules/crans/locale.nix
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@
|
|||
description = "Serveur de stockage ceph";
|
||||
id = 3;
|
||||
|
||||
# Sous Nix mais dans une autre branche
|
||||
isDebian = true;
|
||||
|
||||
networking = {
|
||||
adm.enable = true;
|
||||
san.enable = true;
|
||||
|
|
@ -12,7 +15,7 @@
|
|||
arceus = 12;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
ilo = {
|
||||
id = 53;
|
||||
switch.salameche = 20;
|
||||
|
|
|
|||
|
|
@ -6,8 +6,9 @@ let
|
|||
inherit (lib)
|
||||
mkEnableOption
|
||||
mkOption
|
||||
types
|
||||
mkIf
|
||||
types
|
||||
optional
|
||||
;
|
||||
in
|
||||
{
|
||||
|
|
@ -42,6 +43,13 @@ in
|
|||
description = "Est-ce une machine virtuelle ?";
|
||||
};
|
||||
|
||||
isDebian = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
example = "true";
|
||||
description = "Est-ce une machine Debian ?";
|
||||
};
|
||||
|
||||
description = mkOption {
|
||||
type = types.str;
|
||||
example = "VM de test";
|
||||
|
|
@ -77,5 +85,11 @@ in
|
|||
ldap.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
warnings = (
|
||||
optional (
|
||||
cfg.isVm != (cfg.id >= 100)
|
||||
) "${cfg.name}: isVm (${toString cfg.isVm}) est incohérent avec son id (${toString cfg.id})"
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue