Compare commits

..

10 Commits

7 changed files with 39 additions and 8 deletions

View File

@@ -28,6 +28,7 @@ optimise:
$(TIME) nix-store --optimise
rebuild-build:
nix-channel --add https://nixos.org/channels/nixos-18.03 nixos
$(TIME) time nixos-rebuild build --fallback --show-trace
rebuild-switch:
@@ -43,14 +44,14 @@ show-roots:
nix-store --gc --print-roots
show-time:
-@$(CHRONY_STATUS)
#CHRONY_STATUS='chronyc tracking' CHRONY_STATS='chronyc sources -v' ${CHRONY_STATS} && watch -d -n 20 "${CHRONY_STATUS} && echo "--" && ${CHRONY_STATS}"
-@watch -d -n 20 "$(CHRONY_STATUS) && echo "--" && $(CHRONY_STATS)"
-@$(CHRONY_STATUS) && $(CHRONY_STATS)
-@watch -d -n 5 "$(CHRONY_STATUS) && echo "--" && $(CHRONY_STATS)"
store-repair:
$(TIME) nix-store --verify --check-contents --repair
upgrade:
nix-channel --add https://nixos.org/channels/nixos-18.03 nixos
$(TIME) nixos-rebuild switch --upgrade --fallback --show-trace
##--------- Commandes spécifiques pour NixOS -- Opérations non courantes

View File

@@ -21,7 +21,7 @@ environment.systemPackages = with pkgs; [
clawsMail
hexchat
quasselClient
mumble
#mumble
pidgin
thunderbird

View File

@@ -29,6 +29,7 @@ in
# Activation des pages de manuel
programs.man.enable = true;
# Paquets
environment = {
shellAliases = {

View File

@@ -22,4 +22,11 @@ mkIf true {
allowedUDPPorts = [
];
};
} // {
assertions = [
{
assertion = true;
message = "Assetion toujours valide.";
}
];
}

View File

@@ -62,10 +62,10 @@ let
configurationOptions = {
ipAddress = mkOption {
description = "Adresse IP";
description = "Adresse IP.";
type = lib.types.string;
};
nix-serve-server = mkEnableOption "nix-serve server";
nix-serve-server = mkEnableOption "nix-serve server.";
nix-serve-client = {
enable = mkEnableOption "nix-serve client";
servers = mkOption {
@@ -76,7 +76,7 @@ let
};
tinc = {
enable = mkEnableOption "Enable tinc service";
enable = mkEnableOption "Enable tinc service.";
dnsFQDN = mkOption {
example = "device.example.net.";
description = "DNS name of host pointing to tunnel IP.";

View File

@@ -48,9 +48,22 @@ mkIf flags.munin {
hosts = ''
[${config.networking.hostName}]
address 127.0.0.1
df._dev_sda2.warning 35
use_node_name yes
#contacts syslog
contacts email
'';
# http://sametmax.com/monitorez-vos-serveurs-avec-munin-et-notifications-par-email/
# http://guide.munin-monitoring.org/en/latest/tutorial/alert.html#syntax-of-warning-and-critical
extraGlobalConfig = ''
contact.email.command ${pkgs.mutt}/bin/mutt -F /etc/nixos/base/services/munin-muttrc -s "Munin notification for ''${var:host}" root@prunetwork.fr
#---
#contact.email.command ${pkgs.mutt}/bin/mutt -F /etc/nixos/base/services/munin-muttrc -s "Munin notification for ${config.networking.hostName}" root@ocean.prunetwork.fr
contact.email.command /run/current-system/sw/bin/mutt -F /etc/nixos/base/services/munin-muttrc -s "Munin notification for ${config.networking.hostName}" root@ocean.prunetwork.fr
contact.syslog.command /run/current-system/sw/bin/logger -p user.crit -t "Munin notification for ${config.networking.hostName}"
#---
contact.email.always_send ok,warning,critical,unknown
contact.syslog.always_send ok,warning,critical,unknown
'';
};

View File

@@ -11,11 +11,20 @@ mkIf flags.scanner {
# Paquets
environment.systemPackages = with pkgs; [
# Driver
hplip # Scanner HP
python27Packages.pyqt4 # dépendance hplip
# Outils pour exploiter les scanners
simple-scan
];
# Services
hardware.sane.enable = true;
services.saned = {
enable = true;
extraConfig = "192.168.0.0/24";
};
# Réseau
networking.firewall = {