Compare commits
46 Commits
2a2e988c5e
...
2016-07-13
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
87a0a9d3de | ||
|
|
aae5d9a4cc | ||
| d4417b922a | |||
| c4a3515aa0 | |||
| 8d464837ec | |||
| e486a82be2 | |||
| eeae177744 | |||
| 22bd42f61f | |||
| 092b4a8b44 | |||
| 5c0c2fa2ec | |||
| d71f1b7f57 | |||
| cc1d6f5859 | |||
|
|
2cd5f1c03e | ||
|
|
48f45f76aa | ||
|
|
a228a0e52c | ||
|
|
2cf7a7a7ee | ||
|
|
54382e757c | ||
|
|
a91f81a650 | ||
|
|
c5eeaae443 | ||
|
|
71807d038a | ||
|
|
35b2dede57 | ||
| 2c4daa1766 | |||
| 6ae67f8e09 | |||
| d2b4afd9d4 | |||
|
|
c93cd28bb1 | ||
|
|
f5f92fcb07 | ||
|
|
4857ea1b56 | ||
| f7ac4acd54 | |||
| dccec5d306 | |||
| 58342eef57 | |||
|
|
521d362779 | ||
| e9cf5d5472 | |||
| 691b961d64 | |||
| 76e075cab4 | |||
|
|
51a3a75d74 | ||
|
|
6a53257409 | ||
| 78cb2f7976 | |||
|
|
ddc89e6a6e | ||
|
|
f8890aa003 | ||
| ec72d97c8f | |||
| d7844c641c | |||
| f0c5ce1e8c | |||
| 542105d6e3 | |||
| 606a6738c9 | |||
|
|
2227277cbb | ||
|
|
07669adcf3 |
48
Makefile
Normal file
48
Makefile
Normal file
@@ -0,0 +1,48 @@
|
||||
all: rebuild-switch
|
||||
date
|
||||
|
||||
clean:
|
||||
nix-collect-garbage -d --delete-older-than 15d
|
||||
|
||||
clean-aggressive:
|
||||
nix-collect-garbage -d --delete-older-than 1d
|
||||
|
||||
clean-total:
|
||||
nix-collect-garbage -d
|
||||
|
||||
clean-log:
|
||||
journalctl --vacuum-size=1G
|
||||
|
||||
full-auto: submodules-update upgrade clean optimise
|
||||
|
||||
optimise:
|
||||
nix-store --optimise
|
||||
|
||||
push: submodules-push
|
||||
git push --all
|
||||
git push --tags
|
||||
|
||||
rebuild-switch:
|
||||
nixos-rebuild switch
|
||||
|
||||
store-repair:
|
||||
nix-store --verify --check-contents --repair
|
||||
|
||||
submodules-update:
|
||||
#git submodule update --remote
|
||||
git submodule foreach git co master
|
||||
git submodule foreach git ff
|
||||
|
||||
submodules-push:
|
||||
git submodule foreach git push --all
|
||||
git submodule foreach git push --tags
|
||||
|
||||
submodules-tag:
|
||||
git submodule foreach git tag -f "$$(date +%F)-$$(hostname -s)"
|
||||
|
||||
tag: submodules-tag
|
||||
git tag -f "$$(date +%F)-$$(hostname -s)"
|
||||
|
||||
upgrade:
|
||||
nixos-rebuild switch --upgrade
|
||||
|
||||
7
activation-manuelle/auto-upgrade.nix
Normal file
7
activation-manuelle/auto-upgrade.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Automatic update & automatic clean
|
||||
system.autoUpgrade.enable = true;
|
||||
nix.gc.automatic = true;
|
||||
}
|
||||
11
activation-manuelle/locate.nix
Normal file
11
activation-manuelle/locate.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
];
|
||||
|
||||
services.locate= {
|
||||
enable = true;
|
||||
interval = "hourly";
|
||||
};
|
||||
}
|
||||
7
activation-manuelle/nix-serve-client.nix
Normal file
7
activation-manuelle/nix-serve-client.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Cache http pour le store
|
||||
nix.requireSignedBinaryCaches = false;
|
||||
nix.binaryCaches = [ "http://192.168.10.169:5000" ];
|
||||
}
|
||||
7
activation-manuelle/nix-serve.nix
Normal file
7
activation-manuelle/nix-serve.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Cache http pour le store
|
||||
services.nix-serve.enable = true;
|
||||
networking.firewall.allowedTCPPorts = [5000];
|
||||
}
|
||||
11
activation-manuelle/swap.nix
Normal file
11
activation-manuelle/swap.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
# https://en.wikipedia.org/wiki/Swappiness
|
||||
boot.kernel.sysctl = {
|
||||
# le swap est activé (!= 0)
|
||||
# le swap est utilisé lorsque (100 - x) % de la mémoire est déja allouée
|
||||
"vm.swappiness" = 10;
|
||||
};
|
||||
}
|
||||
7
base.nix
7
base.nix
@@ -2,7 +2,12 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
./tools.nix
|
||||
#./activation-manuelle/auto-upgrade.nix
|
||||
#./activation-manuelle/locate.nix
|
||||
#./activation-manuelle/swap.nix
|
||||
./environment.nix
|
||||
./localisation.nix
|
||||
./networking.nix
|
||||
./services.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,27 +1,41 @@
|
||||
{ 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;
|
||||
|
||||
# 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
|
||||
git gitAndTools.tig
|
||||
exfat # Pour monter les FAT avec Fuse
|
||||
git gitAndTools.gitSVN gitAndTools.tig
|
||||
gnumake
|
||||
gnupg
|
||||
gpm # prise en charge de la souris en console
|
||||
htop
|
||||
ncdu
|
||||
nmap
|
||||
mtr
|
||||
p7zip
|
||||
parted
|
||||
pciutils
|
||||
python34Packages.glances
|
||||
pwgen
|
||||
tmux
|
||||
tree
|
||||
usbutils
|
||||
(import ./vim.nix)
|
||||
wget
|
||||
which
|
||||
];
|
||||
shellAliases = {
|
||||
byobu = "byobu-tmux";
|
||||
@@ -7,9 +7,16 @@
|
||||
status = auto
|
||||
[alias]
|
||||
a = add -p
|
||||
st = status
|
||||
ci = commit
|
||||
co = checkout
|
||||
ff = pull --ff-only
|
||||
# Show files ignored by git
|
||||
ignored = ls-files -o -i --exclude-standard
|
||||
ls = ls-files
|
||||
st = status
|
||||
# Logs
|
||||
lol = log --graph --decorate --pretty=oneline --abbrev-commit
|
||||
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
|
||||
[push]
|
||||
default = simple
|
||||
[core]
|
||||
|
||||
29
networking.nix
Normal file
29
networking.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Définition des domaines utilisés lorsque un identifiant non-FQDN est donné (ping, nslookup)
|
||||
networking = {
|
||||
search = [
|
||||
"dubronetwork.fr"
|
||||
"prunetwork.fr"
|
||||
"teleragno.fr"
|
||||
"teleragno.net"
|
||||
];
|
||||
dnsExtensionMechanism = true;
|
||||
};
|
||||
|
||||
# Utilisation d'adresse IPv6 temporaire
|
||||
|
||||
## https://blog.linitx.com/control-privacy-addressing-ipv6-linux/
|
||||
## http://www.tldp.org/HOWTO/Linux+IPv6-HOWTO/x1092.html
|
||||
|
||||
boot.kernel.sysctl = {
|
||||
"net.ipv6.conf.all.temp_prefered_lft" = 1800; # 30 min
|
||||
"net.ipv6.conf.all.temp_valid_lft" = 3600; # 1 heure
|
||||
"net.ipv6.conf.all.use_tempaddr" = 2; # activé
|
||||
|
||||
"net.ipv6.conf.default.temp_prefered_lft" = 3600; # 1 heure
|
||||
"net.ipv6.conf.default.temp_valid_lft" = 3600; # 1 heure
|
||||
"net.ipv6.conf.default.use_tempaddr" = 2; # activé
|
||||
};
|
||||
}
|
||||
31
services.nix
Normal file
31
services.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Sécurité & Acces distant
|
||||
|
||||
## Augmentation de l'entropie du système par un générateur de nombres aléatoires
|
||||
## cat /proc/sys/kernel/random/entropy_avail
|
||||
services.haveged = {
|
||||
enable = true;
|
||||
refill_threshold = 2048;
|
||||
};
|
||||
|
||||
## OpenSSH daemon
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = [ pkgs.samsung-unified-linux-driver ];
|
||||
};
|
||||
|
||||
# Monitoring
|
||||
|
||||
## Noeud de supervision munin = pas de stockage des données locales
|
||||
|
||||
services.munin-node = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
3
vimrc
3
vimrc
@@ -24,10 +24,11 @@ set shiftround "Round indent to nearest shiftwidth multiple
|
||||
|
||||
"""""" Réglages cosmétiques
|
||||
set background=dark
|
||||
set cc=80
|
||||
set number
|
||||
highlight ColorColumn ctermbg=8
|
||||
"Détection de la profondeur des couleurs (8bits)
|
||||
if &t_Co > 8
|
||||
colorscheme wombat256mod
|
||||
let &colorcolumn="80,".join(range(120,999),",")
|
||||
highlight ColorColumn ctermbg=235 guibg=#2c2d27
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user