Compare commits
23 Commits
2016-10-17
...
2016-10-25
| Author | SHA1 | Date | |
|---|---|---|---|
| 3b04c2edb0 | |||
| 2982725e0b | |||
| 9e8d3b24b3 | |||
| dba3a46ebd | |||
| d6bfe1c706 | |||
| 7dada8a3e6 | |||
| bd0076b9d1 | |||
| 6800de18af | |||
| 5d831cf7be | |||
| 2ffdaf0a53 | |||
| 7dbfccf2f4 | |||
| e2e15cad39 | |||
| 2d770067b7 | |||
| 46e61f0fed | |||
|
|
99d5886aff | ||
|
|
21d7c97c76 | ||
|
|
3a8a728268 | ||
| a5aae179a2 | |||
| 95e8687609 | |||
| 8e35b38d19 | |||
| 51dd0b65f4 | |||
| 18f960b879 | |||
| a8e28e594a |
2
Makefile
2
Makefile
@@ -37,7 +37,7 @@ push: submodules-push
|
|||||||
|
|
||||||
submodules-update:
|
submodules-update:
|
||||||
#git submodule update --remote
|
#git submodule update --remote
|
||||||
git submodule foreach git co master
|
#git submodule foreach git co master
|
||||||
git submodule foreach git ff
|
git submodule foreach git ff
|
||||||
|
|
||||||
submodules-push:
|
submodules-push:
|
||||||
|
|||||||
@@ -13,13 +13,14 @@ Actuellement, les scripts contiennent un peu de configuration spécifique pour l
|
|||||||
# Notes pour l'upgrade de 16.03 vers 16.09
|
# Notes pour l'upgrade de 16.03 vers 16.09
|
||||||
|
|
||||||
* mettre le dépôt base sur la branche upgrade-16.09
|
* mettre le dépôt base sur la branche upgrade-16.09
|
||||||
|
* changer le channel nixos : ```nix-channel --add https://nixos.org/channels/nixos-16.09 nixos```
|
||||||
* activer x11 dans le configuration.nix
|
* activer x11 dans le configuration.nix
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
* remplacer le bootloader
|
* remplacer le bootloader si gummiboot était utilisé
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
boot.loader.gummiboot.enable = true;
|
boot.loader.gummiboot.enable = true;
|
||||||
@@ -42,6 +42,8 @@ in
|
|||||||
edition-photo = mkEnableOption "Profil pour la création/édition de photos.";
|
edition-photo = mkEnableOption "Profil pour la création/édition de photos.";
|
||||||
edition-video = mkEnableOption "Profil pour la création/édition de video.";
|
edition-video = mkEnableOption "Profil pour la création/édition de video.";
|
||||||
fail2ban = mkEnableOption "Profil pour activer Fail2ban.";
|
fail2ban = mkEnableOption "Profil pour activer Fail2ban.";
|
||||||
|
hydra-builder = mkEnableOption "Profil pour une machine qui compile pour hydra.";
|
||||||
|
hydra-core = mkEnableOption "Profil pour un serveur hydra.";
|
||||||
jeux = mkEnableOption "Profil pour les jeux vidéos.";
|
jeux = mkEnableOption "Profil pour les jeux vidéos.";
|
||||||
laptop = mkEnableOption "Profil pour les outils spécifiques aux ordinateurs portables..";
|
laptop = mkEnableOption "Profil pour les outils spécifiques aux ordinateurs portables..";
|
||||||
locate = mkEnableOption "Profil pour activer la fonction locate.";
|
locate = mkEnableOption "Profil pour activer la fonction locate.";
|
||||||
@@ -181,6 +183,8 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
r6d.config-generator = {
|
r6d.config-generator = {
|
||||||
|
hydra-builder = true;
|
||||||
|
hydra-core = true;
|
||||||
print = true;
|
print = true;
|
||||||
virtualbox = true;
|
virtualbox = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -16,3 +16,8 @@ case "$TERM" in
|
|||||||
xterm) TERM=xterm-256color;;
|
xterm) TERM=xterm-256color;;
|
||||||
screen) TERM=screen-256color;;
|
screen) TERM=screen-256color;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# info gnupg, invocate gpg agent
|
||||||
|
GPG_TTY=$(tty)
|
||||||
|
export GPG_TTY
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ in
|
|||||||
p7zip # compression de fichier
|
p7zip # compression de fichier
|
||||||
parted # partitionnement de disque
|
parted # partitionnement de disque
|
||||||
pciutils
|
pciutils
|
||||||
|
pinentry # pour taper les mots de passe gpg
|
||||||
psmisc # fournis les utilitaires comme killall, fuser, pstree
|
psmisc # fournis les utilitaires comme killall, fuser, pstree
|
||||||
python # python -- python -m SimpleHTTPServer 8000
|
python # python -- python -m SimpleHTTPServer 8000
|
||||||
python34Packages.glances # monitoring
|
python34Packages.glances # monitoring
|
||||||
@@ -56,6 +57,7 @@ in
|
|||||||
];
|
];
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
byobu = "byobu-tmux";
|
byobu = "byobu-tmux";
|
||||||
|
gpg = "gpg2";
|
||||||
jacques-a-dit = "sudo";
|
jacques-a-dit = "sudo";
|
||||||
tree = "tree -C";
|
tree = "tree -C";
|
||||||
tree1 = "tree -d -L 1";
|
tree1 = "tree -d -L 1";
|
||||||
|
|||||||
18
public/network.nix
Normal file
18
public/network.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
|
cfg = config.r6d.config-generator;
|
||||||
|
computers = config.r6d.computers;
|
||||||
|
profiles = config.r6d.profiles;
|
||||||
|
in
|
||||||
|
|
||||||
|
mkIf true {
|
||||||
|
|
||||||
|
# fix: Hostname -s renvoie "Unknown host" alors que hostname renvoie la bonne valeur
|
||||||
|
# Il s'avère que hostname vérifie la validité du FQDN et du reverse.
|
||||||
|
# Fixer ces paramètres dans les hosts permet de faire tomber en marche
|
||||||
|
networking.extraHosts = ''
|
||||||
|
127.0.0.1 ${config.networking.hostName}
|
||||||
|
'';
|
||||||
|
}
|
||||||
@@ -12,6 +12,7 @@ in
|
|||||||
# installées systématiquement
|
# installées systématiquement
|
||||||
./environment.nix
|
./environment.nix
|
||||||
./localisation.nix
|
./localisation.nix
|
||||||
|
./network.nix
|
||||||
#./network-ipv6.nix
|
#./network-ipv6.nix
|
||||||
./sudo.nix
|
./sudo.nix
|
||||||
./service-haveged.nix
|
./service-haveged.nix
|
||||||
@@ -33,6 +34,8 @@ in
|
|||||||
./auto-upgrade.nix # mise à jour automatique du système
|
./auto-upgrade.nix # mise à jour automatique du système
|
||||||
./laptop.nix # appli & configuration adaptée pour un PC portable
|
./laptop.nix # appli & configuration adaptée pour un PC portable
|
||||||
./print.nix # configuration de base de cups
|
./print.nix # configuration de base de cups
|
||||||
|
./service-hydra-build.nix # service de construction de paquet. -> la machine compile des paquets
|
||||||
|
./service-hydra-core.nix # service pour l'instance d'hydra
|
||||||
./service-laptop.nix # services spécifiques aux pc portables
|
./service-laptop.nix # services spécifiques aux pc portables
|
||||||
./service-locate.nix # service locate
|
./service-locate.nix # service locate
|
||||||
./swap.nix # définition de l'utilisation du swap
|
./swap.nix # définition de l'utilisation du swap
|
||||||
|
|||||||
31
public/service-hydra-build.nix
Normal file
31
public/service-hydra-build.nix
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
|
cfg = config.r6d.config-generator;
|
||||||
|
computers = config.r6d.computers;
|
||||||
|
profiles = config.r6d.profiles;
|
||||||
|
in
|
||||||
|
|
||||||
|
mkIf cfg.hydra-builder {
|
||||||
|
|
||||||
|
# Paquets
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
];
|
||||||
|
|
||||||
|
# Services
|
||||||
|
|
||||||
|
|
||||||
|
virtualisation.virtualbox.host.enable = true;
|
||||||
|
nix.gc.automatic = true;
|
||||||
|
|
||||||
|
users.users."hydrabld" = {
|
||||||
|
description = "Execution des job hydra";
|
||||||
|
group = "nixbld";
|
||||||
|
isNormalUser = false;
|
||||||
|
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGYpjcWJCf8dXpv2LmoIaNVbwZXEC50QUU6Az+lqeD89 hydra radx"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
60
public/service-hydra-core.nix
Normal file
60
public/service-hydra-core.nix
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
|
cfg = config.r6d.config-generator;
|
||||||
|
computers = config.r6d.computers;
|
||||||
|
profiles = config.r6d.profiles;
|
||||||
|
in
|
||||||
|
|
||||||
|
mkIf cfg.hydra-core {
|
||||||
|
|
||||||
|
# Paquets
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
];
|
||||||
|
|
||||||
|
# Services
|
||||||
|
|
||||||
|
## Hydra
|
||||||
|
# 2. créer un utilisateur pour gérer hydra
|
||||||
|
# su - hydra
|
||||||
|
# hydra-create-user jpierre03 --password xxx --role 'admin'
|
||||||
|
|
||||||
|
services.hydra = {
|
||||||
|
enable = true;
|
||||||
|
hydraURL = "http://hydra.${config.networking.hostName}";
|
||||||
|
notificationSender = "hydra@${config.networking.hostName}";
|
||||||
|
listenHost = "localhost";
|
||||||
|
minimumDiskFree = 50; # Go
|
||||||
|
};
|
||||||
|
|
||||||
|
## Ménage
|
||||||
|
#nix.gc.automatic = true;
|
||||||
|
|
||||||
|
## Délégation des actions de compilation à la compilefarm
|
||||||
|
|
||||||
|
### Machines connues
|
||||||
|
# 2. récupérer la clef publique du serveur ssh : ssh-keyscan localhost + l'ajouter dans les knownHosts
|
||||||
|
|
||||||
|
programs.ssh.knownHosts = {
|
||||||
|
"monstre.dubronetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBTTrLhq1Cwm0rpnwEIxSLqVrJWZnt+/9dt+SKd8NiIc";
|
||||||
|
"pedro.dubronetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM7fjo2ysLqlfSo6BKnc6I6m1ayoPrbwEEyTKZmUzsOD";
|
||||||
|
"ocean.prunetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINCaRuTl8iCTUE4XInOpkSlwQj5Re4w4Iq+gNIlJe8pA";
|
||||||
|
"radx.prunetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGyoXdTEnxSgZTMfRfVH+bpOGZJtJpydAijcRGsZik7U";
|
||||||
|
"rollo.dubronetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID4lWgS/sVdcZvnAAN+lBSOcCL9ISdAUsjp1kh9lalNu";
|
||||||
|
};
|
||||||
|
|
||||||
|
# une fois installé :
|
||||||
|
# 1. créer chef SSH : ssh-keygen -C "hydra@pedro.dubronetwork.fr" -N "" -f /etc/nixos/id_buildfarm
|
||||||
|
# ssh-keygen -t ed25519 -C "hydra MACHINE" -f /etc/nixos/hydra-ssh-key
|
||||||
|
# accessible à hydra.pedro.dubnronetwork.fr
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
distributedBuilds = true;
|
||||||
|
buildMachines = [
|
||||||
|
# { hostName = "pedro.dubronetwork.fr"; maxJobs = 2; speedFactor = 10; sshKey = "/etc/nixos/id_buildfarm"; sshUser = "root"; system = "x86_64-linux"; }
|
||||||
|
];
|
||||||
|
extraOptions = "auto-optimise-store = true";
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user