Compare commits
11 Commits
2016-07-21
...
2016-07-21
| Author | SHA1 | Date | |
|---|---|---|---|
| 20e8e8beaa | |||
| 66252cb498 | |||
| 906ae9b7d1 | |||
| 2195033ee5 | |||
| becd37ba28 | |||
| f55ae85a66 | |||
| cd458f24a7 | |||
| 86c46a97de | |||
| b2619291a7 | |||
| 5350372774 | |||
|
|
3d1a7d2161 |
5
README
Normal file
5
README
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
# Lien pour install sur machine distante
|
||||||
|
|
||||||
|
* https://nixos.org/wiki/How_to_install_NixOS_from_Linux#Installing_through_a_chroot
|
||||||
|
* https://github.com/NixOS/nixpkgs/issues/13305
|
||||||
@@ -12,7 +12,11 @@ in {
|
|||||||
(mkIf (profiles.isDubronetwork && (! computers.isMonstre)) "http://192.168.10.169:5000")
|
(mkIf (profiles.isDubronetwork && (! computers.isMonstre)) "http://192.168.10.169:5000")
|
||||||
(mkIf profiles.isDubronetwork "http://192.168.10.252:5000")
|
(mkIf profiles.isDubronetwork "http://192.168.10.252:5000")
|
||||||
|
|
||||||
(mkIf profiles.isPrunetwork "http://192.168.1.20:5000")
|
(mkIf (profiles.isPrunetwork && !profiles.isServer) "http://192.168.1.20:5000")
|
||||||
];
|
];
|
||||||
};
|
extraOptions = ''
|
||||||
}
|
connect-timeout = 5
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
11
activation-manuelle/print.nix
Normal file
11
activation-manuelle/print.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# Enable CUPS to print documents.
|
||||||
|
services.printing = pkgs.lib.mkIf config.r6d.config-generator.print {
|
||||||
|
enable = true;
|
||||||
|
drivers = [
|
||||||
|
pkgs.samsung-unified-linux-driver
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
26
activation-manuelle/users.nix
Normal file
26
activation-manuelle/users.nix
Normal file
File diff suppressed because one or more lines are too long
@@ -17,7 +17,9 @@ in
|
|||||||
./activation-manuelle/fail2ban.nix
|
./activation-manuelle/fail2ban.nix
|
||||||
./activation-manuelle/nix-serve-client.nix
|
./activation-manuelle/nix-serve-client.nix
|
||||||
./activation-manuelle/nix-serve-server.nix
|
./activation-manuelle/nix-serve-server.nix
|
||||||
|
./activation-manuelle/print.nix
|
||||||
./activation-manuelle/swap.nix
|
./activation-manuelle/swap.nix
|
||||||
|
./activation-manuelle/users.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
###### interface
|
###### interface
|
||||||
@@ -46,8 +48,9 @@ in
|
|||||||
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.";
|
||||||
nix-serve-client= mkEnableOption "Profil pour que la machine soit un serveur de cache nix.";
|
nix-serve-client= mkEnableOption "Profil pour que la machine soit un client de cache nix.";
|
||||||
nix-serve-server= mkEnableOption "Profil pour que la machine soit un serveur de cache nix.";
|
nix-serve-server= mkEnableOption "Profil pour que la machine soit un serveur de cache nix.";
|
||||||
|
print = mkEnableOption "Profil pour activer cups & pouvoir imprimer.";
|
||||||
swap = mkEnableOption "Profil pour que le swap soit activé.";
|
swap = mkEnableOption "Profil pour que le swap soit activé.";
|
||||||
virtualbox = mkEnableOption "Profil pour l'utilisation de VirtualBox.";
|
virtualbox = mkEnableOption "Profil pour l'utilisation de VirtualBox.";
|
||||||
xmonad = mkEnableOption "Profil pour activer le gestionnaire de fenêtres xmonad.";
|
xmonad = mkEnableOption "Profil pour activer le gestionnaire de fenêtres xmonad.";
|
||||||
@@ -58,6 +61,7 @@ in
|
|||||||
isMonstre = mkEnableOption "Identification du nom de machine.";
|
isMonstre = mkEnableOption "Identification du nom de machine.";
|
||||||
isNeoNomade = mkEnableOption "Identification du nom de machine.";
|
isNeoNomade = mkEnableOption "Identification du nom de machine.";
|
||||||
isNomade = mkEnableOption "Identification du nom de machine.";
|
isNomade = mkEnableOption "Identification du nom de machine.";
|
||||||
|
isOcean = mkEnableOption "Identification du nom de machine.";
|
||||||
isPhenom = mkEnableOption "Identification du nom de machine.";
|
isPhenom = mkEnableOption "Identification du nom de machine.";
|
||||||
isRadx = mkEnableOption "Identification du nom de machine.";
|
isRadx = mkEnableOption "Identification du nom de machine.";
|
||||||
isXray = mkEnableOption "Identification du nom de machine.";
|
isXray = mkEnableOption "Identification du nom de machine.";
|
||||||
@@ -76,6 +80,7 @@ in
|
|||||||
isMonstre = host == "monstre.dubronetwork.fr";
|
isMonstre = host == "monstre.dubronetwork.fr";
|
||||||
isNeoNomade = host == "neo-nomade.dubronetwork.fr";
|
isNeoNomade = host == "neo-nomade.dubronetwork.fr";
|
||||||
isNomade = host == "nomade.dubronetwork.fr";
|
isNomade = host == "nomade.dubronetwork.fr";
|
||||||
|
isOcean = host == "ocean.prunetwork.fr";
|
||||||
isPhenom = host == "phenom.dubronetwork.fr";
|
isPhenom = host == "phenom.dubronetwork.fr";
|
||||||
isRadx = host == "radx.prunetwork.fr";
|
isRadx = host == "radx.prunetwork.fr";
|
||||||
isXray = host == "xray.prunetwork.fr";
|
isXray = host == "xray.prunetwork.fr";
|
||||||
@@ -87,6 +92,7 @@ in
|
|||||||
## Définition des profils génériques
|
## Définition des profils génériques
|
||||||
(mkIf pfl.isDesktop {
|
(mkIf pfl.isDesktop {
|
||||||
r6d.config-generator.awesome = true;
|
r6d.config-generator.awesome = true;
|
||||||
|
r6d.config-generator.nix-serve-client = true;
|
||||||
})
|
})
|
||||||
(mkIf pfl.isHome {
|
(mkIf pfl.isHome {
|
||||||
r6d.profiles.isDesktop = true;
|
r6d.profiles.isDesktop = true;
|
||||||
@@ -102,6 +108,7 @@ in
|
|||||||
(mkIf pfl.isDubronetwork {
|
(mkIf pfl.isDubronetwork {
|
||||||
r6d.config-generator.auto-upgrade = true;
|
r6d.config-generator.auto-upgrade = true;
|
||||||
r6d.config-generator.nix-serve-client = true;
|
r6d.config-generator.nix-serve-client = true;
|
||||||
|
r6d.config-generator.print = true;
|
||||||
})
|
})
|
||||||
(mkIf (pfl.isDubronetwork && pfl.isHome) {
|
(mkIf (pfl.isDubronetwork && pfl.isHome) {
|
||||||
r6d.config-generator.jeux = true;
|
r6d.config-generator.jeux = true;
|
||||||
@@ -115,12 +122,15 @@ in
|
|||||||
(mkIf pfl.isPrunetwork {
|
(mkIf pfl.isPrunetwork {
|
||||||
r6d.config-generator.auto-upgrade = true;
|
r6d.config-generator.auto-upgrade = true;
|
||||||
r6d.config-generator.fail2ban = true;
|
r6d.config-generator.fail2ban = true;
|
||||||
r6d.config-generator.nix-serve-client = true;
|
|
||||||
r6d.config-generator.swap = true;
|
r6d.config-generator.swap = true;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
## Affectation des profils aux machines
|
## Affectation des profils aux machines
|
||||||
|
(mkIf comp.isOcean {
|
||||||
|
r6d.profiles.isPrunetwork = true;
|
||||||
|
r6d.profiles.isServer = true;
|
||||||
|
})
|
||||||
(mkIf comp.isRadx {
|
(mkIf comp.isRadx {
|
||||||
r6d.profiles.isHome = true;
|
r6d.profiles.isHome = true;
|
||||||
r6d.profiles.isPrunetwork = true;
|
r6d.profiles.isPrunetwork = true;
|
||||||
|
|||||||
@@ -22,12 +22,14 @@
|
|||||||
gnupg # GPG
|
gnupg # GPG
|
||||||
gpm # prise en charge de la souris en console
|
gpm # prise en charge de la souris en console
|
||||||
htop # monitoring
|
htop # monitoring
|
||||||
|
#libressl # librairie pour faire du TLS et les algorithmes de crypto par OpenBSD
|
||||||
ncdu # outil pour voir l'espace utilisé
|
ncdu # outil pour voir l'espace utilisé
|
||||||
nmap # outil de scan de port réseau
|
nmap # outil de scan de port réseau
|
||||||
mtr # outil de diagnostic réseau
|
mtr # outil de diagnostic réseau
|
||||||
p7zip # compression de fichier
|
p7zip # compression de fichier
|
||||||
parted # partitionnement de disque
|
parted # partitionnement de disque
|
||||||
pciutils
|
pciutils
|
||||||
|
python # python -- python -m SimpleHTTPServer 8000
|
||||||
python34Packages.glances # monitoring
|
python34Packages.glances # monitoring
|
||||||
pwgen # générateur de mot de passe
|
pwgen # générateur de mot de passe
|
||||||
tmux # nécessaire pour byobu
|
tmux # nécessaire pour byobu
|
||||||
@@ -53,4 +55,16 @@
|
|||||||
promptInit = builtins.readFile ./bash-prompt.sh;
|
promptInit = builtins.readFile ./bash-prompt.sh;
|
||||||
interactiveShellInit = builtins.readFile ./bash-interactive-init.sh;
|
interactiveShellInit = builtins.readFile ./bash-interactive-init.sh;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# https://wiki.mozilla.org/Security/Guidelines/OpenSSH#Modern
|
||||||
|
programs.ssh.extraConfig = ''
|
||||||
|
# Ensure KnownHosts are unreadable if leaked - it is otherwise easier to know which hosts your keys have access to.
|
||||||
|
HashKnownHosts yes
|
||||||
|
# Host keys the client accepts - order here is honored by OpenSSH
|
||||||
|
HostKeyAlgorithms ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ssh-rsa,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256
|
||||||
|
|
||||||
|
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp256,ecdh-sha2-nistp384,diffie-hellman-group-exchange-sha256
|
||||||
|
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com
|
||||||
|
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|||||||
19
services.nix
19
services.nix
@@ -13,14 +13,19 @@
|
|||||||
## OpenSSH daemon
|
## OpenSSH daemon
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
# https://wiki.mozilla.org/Security/Guidelines/OpenSSH#Modern_.28OpenSSH_6.7.2B.29
|
||||||
|
extraConfig = ''
|
||||||
|
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256
|
||||||
|
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
|
||||||
|
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
# LogLevel VERBOSE logs user's key fingerprint on login. Needed to have a clear audit track of which key was using to log in.
|
||||||
services.printing = {
|
LogLevel VERBOSE
|
||||||
enable = true;
|
|
||||||
drivers = [
|
# Use kernel sandbox mechanisms where possible in unprivilegied processes
|
||||||
pkgs.samsung-unified-linux-driver
|
# Systrace on OpenBSD, Seccomp on Linux, seatbelt on MacOSX/Darwin, rlimit elsewhere.
|
||||||
];
|
UsePrivilegeSeparation sandbox
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# Monitoring
|
# Monitoring
|
||||||
|
|||||||
Reference in New Issue
Block a user