mirror of https://gitlab.crans.org/nounous/nixos
continue POC refactor
parent
164c1e22db
commit
c0b76bba4d
71
flake.nix
71
flake.nix
|
|
@ -38,63 +38,26 @@
|
||||||
./modules
|
./modules
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
];
|
];
|
||||||
|
hosts = import ./hosts.nix;
|
||||||
in
|
in
|
||||||
{
|
# Physiques
|
||||||
apprentix = nixosSystem {
|
(mapAttrs (name: value:
|
||||||
|
nixosSystem {
|
||||||
specialArgs = inputs;
|
specialArgs = inputs;
|
||||||
modules = [ ./hosts/vm/apprentix ] ++ baseModules;
|
modules = [./hosts/physiques/${name}] ++ baseModules;
|
||||||
};
|
}
|
||||||
|
)
|
||||||
jitsi = nixosSystem {
|
(filterAttrs (n: v: !(attrByPath ["is_debian"] false v)) hosts.physiques)
|
||||||
|
)//
|
||||||
|
# VMs
|
||||||
|
(mapAttrs (name: value:
|
||||||
|
nixosSystem {
|
||||||
specialArgs = inputs;
|
specialArgs = inputs;
|
||||||
modules = [ ./hosts/vm/jitsi ] ++ baseModules;
|
modules = [./hosts/vm/${name}] ++ baseModules;
|
||||||
};
|
}
|
||||||
|
)
|
||||||
livre = nixosSystem {
|
(filterAttrs (n: v: !(attrByPath ["is_debian"] false v)) hosts.vms)
|
||||||
specialArgs = inputs;
|
);
|
||||||
modules = [ ./hosts/vm/livre ] ++ baseModules;
|
|
||||||
};
|
|
||||||
|
|
||||||
neo = nixosSystem {
|
|
||||||
specialArgs = inputs;
|
|
||||||
modules = [ ./hosts/vm/neo ] ++ baseModules;
|
|
||||||
};
|
|
||||||
|
|
||||||
nextcloud = nixosSystem {
|
|
||||||
specialArgs = inputs;
|
|
||||||
modules = [ ./hosts/vm/nextcloud ] ++ baseModules;
|
|
||||||
};
|
|
||||||
|
|
||||||
periodique = nixosSystem {
|
|
||||||
specialArgs = inputs;
|
|
||||||
modules = [ ./hosts/vm/periodique ] ++ baseModules;
|
|
||||||
};
|
|
||||||
|
|
||||||
redite = nixosSystem {
|
|
||||||
specialArgs = inputs;
|
|
||||||
modules = [ ./hosts/vm/redite ] ++ baseModules;
|
|
||||||
};
|
|
||||||
|
|
||||||
reverseproxy = nixosSystem {
|
|
||||||
specialArgs = inputs;
|
|
||||||
modules = [ ./hosts/vm/reverseproxy ] ++ baseModules;
|
|
||||||
};
|
|
||||||
|
|
||||||
thot = nixosSystem {
|
|
||||||
specialArgs = inputs;
|
|
||||||
modules = [ ./hosts/physiques/thot ] ++ baseModules;
|
|
||||||
};
|
|
||||||
|
|
||||||
two = nixosSystem {
|
|
||||||
specialArgs = inputs;
|
|
||||||
modules = [ ./hosts/vm/two ] ++ baseModules;
|
|
||||||
};
|
|
||||||
|
|
||||||
vaultwarden = nixosSystem {
|
|
||||||
specialArgs = inputs;
|
|
||||||
modules = [ ./hosts/vm/vaultwarden ] ++ baseModules;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
perSystem =
|
perSystem =
|
||||||
|
|
|
||||||
147
hosts.nix
147
hosts.nix
|
|
@ -1,20 +1,26 @@
|
||||||
{adm,srv,srv-nat,san, adh}:
|
let
|
||||||
|
adm = 10;
|
||||||
|
srv = n: 4;
|
||||||
|
srv-nat = 2;
|
||||||
|
san = 3;
|
||||||
|
adh = 42;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
physiques = [
|
physiques ={
|
||||||
{
|
# cephirot = {
|
||||||
name = "cephirot";
|
# name = "cephirot";
|
||||||
id = 3;
|
# id = 3;
|
||||||
vlans = [
|
# vlans = [
|
||||||
adm
|
# adm
|
||||||
san
|
# san
|
||||||
];
|
# ];
|
||||||
serveur_type = ["san"];
|
# serveur_type = ["san"];
|
||||||
description = ''
|
# description = ''
|
||||||
Un serveur avec peut etre un jour ceph
|
# Un serveur avec peut etre un jour ceph
|
||||||
'';
|
# '';
|
||||||
public-ssh = "ssh-rsa TODOTODOTODOTODOTODOTODOTODO";
|
# public-ssh = "ssh-rsa TODOTODOTODOTODOTODOTODOTODO";
|
||||||
}
|
# };
|
||||||
{
|
thot = {
|
||||||
name = "thot";
|
name = "thot";
|
||||||
id = 14;
|
id = 14;
|
||||||
vlans = [
|
vlans = [
|
||||||
|
|
@ -26,11 +32,11 @@
|
||||||
Serveur de backup du Crans, actuellement en SQ39
|
Serveur de backup du Crans, actuellement en SQ39
|
||||||
'';
|
'';
|
||||||
public-ssh = "ssh-rsa TODOTODOTODOTODOTODOTODOTODO";
|
public-ssh = "ssh-rsa TODOTODOTODOTODOTODOTODOTODO";
|
||||||
}
|
};
|
||||||
];
|
};
|
||||||
|
|
||||||
vms = [
|
vms = {
|
||||||
{
|
romanesco = {
|
||||||
name = "romanesco";
|
name = "romanesco";
|
||||||
is_debian = true;
|
is_debian = true;
|
||||||
id = 145;
|
id = 145;
|
||||||
|
|
@ -43,8 +49,8 @@
|
||||||
DNS récursif
|
DNS récursif
|
||||||
'';
|
'';
|
||||||
public-ssh = "ssh-rsa TODOTODOTODOTODOTODOTODOTODO";
|
public-ssh = "ssh-rsa TODOTODOTODOTODOTODOTODOTODO";
|
||||||
}
|
};
|
||||||
{
|
neo = {
|
||||||
name = "neo";
|
name = "neo";
|
||||||
id = 145;
|
id = 145;
|
||||||
vlans = [
|
vlans = [
|
||||||
|
|
@ -56,9 +62,8 @@
|
||||||
Matrix du crans, heberge également le bridge IRC <-> Matrix
|
Matrix du crans, heberge également le bridge IRC <-> Matrix
|
||||||
'';
|
'';
|
||||||
public-ssh = "ssh-rsa TODOTODOTODOTODOTODOTODOTODO";
|
public-ssh = "ssh-rsa TODOTODOTODOTODOTODOTODOTODO";
|
||||||
}
|
};
|
||||||
{
|
nextcloud = {
|
||||||
name = "NextCloud";
|
|
||||||
id = 146;
|
id = 146;
|
||||||
vlans = [
|
vlans = [
|
||||||
adm
|
adm
|
||||||
|
|
@ -69,6 +74,94 @@
|
||||||
NextCloud du Crans
|
NextCloud du Crans
|
||||||
'';
|
'';
|
||||||
public-ssh = "ssh-rsa TODOTODOTODOTODOTODOTODOTODO";
|
public-ssh = "ssh-rsa TODOTODOTODOTODOTODOTODOTODO";
|
||||||
}
|
};
|
||||||
];
|
apprentix = {
|
||||||
|
id = 150;
|
||||||
|
vlans = [
|
||||||
|
adm
|
||||||
|
];
|
||||||
|
description = ''
|
||||||
|
VM NixOs apprentie
|
||||||
|
'';
|
||||||
|
public-ssh = "ssh-rsa TODOTODOTODOTODOTODOTODOTODO";
|
||||||
|
};
|
||||||
|
jitsi = {
|
||||||
|
id = 163;
|
||||||
|
vlans = [
|
||||||
|
adm
|
||||||
|
(srv "185.230.79.15")
|
||||||
|
];
|
||||||
|
description = ''
|
||||||
|
Jitsi du crans
|
||||||
|
'';
|
||||||
|
public-ssh = "ssh-rsa TODOTODOTODOTODOTODOTODOTODO";
|
||||||
|
};
|
||||||
|
livre = {
|
||||||
|
id = 140;
|
||||||
|
vlans = [
|
||||||
|
adm
|
||||||
|
srv-nat
|
||||||
|
];
|
||||||
|
description = ''
|
||||||
|
Stirling PDF
|
||||||
|
'';
|
||||||
|
public-ssh = "ssh-rsa TODOTODOTODOTODOTODOTODOTODO";
|
||||||
|
};
|
||||||
|
periodique = {
|
||||||
|
id = 118;
|
||||||
|
vlans = [
|
||||||
|
adm
|
||||||
|
srv-nat
|
||||||
|
];
|
||||||
|
description = ''
|
||||||
|
Client matrix web (element)
|
||||||
|
'';
|
||||||
|
public-ssh = "ssh-rsa TODOTODOTODOTODOTODOTODOTODO";
|
||||||
|
};
|
||||||
|
redite = {
|
||||||
|
id = 139;
|
||||||
|
vlans = [
|
||||||
|
adm
|
||||||
|
srv-nat
|
||||||
|
];
|
||||||
|
description = ''
|
||||||
|
Redite
|
||||||
|
'';
|
||||||
|
public-ssh = "ssh-rsa TODOTODOTODOTODOTODOTODOTODO";
|
||||||
|
};
|
||||||
|
reverseproxy = {
|
||||||
|
id = 151;
|
||||||
|
vlans = [
|
||||||
|
adm
|
||||||
|
srv-nat
|
||||||
|
(srv "185.230.79.42")
|
||||||
|
];
|
||||||
|
description = ''
|
||||||
|
NextCloud du Crans
|
||||||
|
'';
|
||||||
|
public-ssh = "ssh-rsa TODOTODOTODOTODOTODOTODOTODO";
|
||||||
|
};
|
||||||
|
two = {
|
||||||
|
id = 135;
|
||||||
|
vlans = [
|
||||||
|
adm
|
||||||
|
srv-nat
|
||||||
|
];
|
||||||
|
description = ''
|
||||||
|
Une vm de test
|
||||||
|
'';
|
||||||
|
public-ssh = "ssh-rsa TODOTODOTODOTODOTODOTODOTODO";
|
||||||
|
};
|
||||||
|
vaultwarden = {
|
||||||
|
id = 159;
|
||||||
|
vlans = [
|
||||||
|
adm
|
||||||
|
srv-nat
|
||||||
|
];
|
||||||
|
description = ''
|
||||||
|
Vaultwarden
|
||||||
|
'';
|
||||||
|
public-ssh = "ssh-rsa TODOTODOTODOTODOTODOTODOTODO";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue