You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nixos-template-base/environment.nix

70 lines
3.0 KiB
Nix

9 years ago
{ config, pkgs, ... }:
{
# Nombre de process d'installation en parrallèle effectués par Nix
nix.buildCores = 0;
# The NixOS release to be compatible with for stateful data such as databases.
system.stateVersion = "16.03";
# On autorise les paquets non-libres
nixpkgs.config.allowUnfree = true;
9 years ago
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment = {
systemPackages = with pkgs; [
bind # utilisé pour les utilitaires comme dig
byobu # permet de se déconnecter d'un terminal sans l'aréter
exfat # Pour monter les FAT avec Fuse
git gitAndTools.gitSVN gitAndTools.tig # outil de gestion de version
gnumake # pour décrire les recettes de compilation
gnupg # GPG
gpm # prise en charge de la souris en console
htop # monitoring
ncdu # outil pour voir l'espace utilisé
nmap # outil de scan de port réseau
mtr # outil de diagnostic réseau
p7zip # compression de fichier
parted # partitionnement de disque
pciutils
9 years ago
python # python -- python -m SimpleHTTPServer 8000
python34Packages.glances # monitoring
pwgen # générateur de mot de passe
tmux # nécessaire pour byobu
tree # affiche une arborescence de fichiers et dossiers
usbutils
9 years ago
(import ./vim.nix)
wget # client HTTP console
which # pour connaitre le chemin d'un exécutable
9 years ago
];
shellAliases = {
byobu = "byobu-tmux";
tree = "tree -C";
tree1 = "tree -d -L 1";
tree2 = "tree -d -L 2";
tree3 = "tree -d -L 3";
grep = "grep --color=auto";
vi = "vim";
};
etc.gitconfig.text = builtins.readFile ./gitconfig;
};
programs.bash = {
enableCompletion = true;
promptInit = builtins.readFile ./bash-prompt.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
'';
9 years ago
}