blob: b4080ecf971ed5cce33c4a0b6c1196e45f218a4e (
plain) (
tree)
|
|
{ pkgs, lib, config, name, ... }:
{
config = {
services.duplyBackup.profiles.system = {
rootDir = "/var/lib";
excludeFile = lib.mkAfter ''
+ /var/lib/nixos
+ /var/lib/udev
+ /var/lib/udisks2
+ /var/lib/systemd
+ /var/lib/private/systemd
- /var/lib
'';
};
nixpkgs.overlays = builtins.attrValues (import ../../overlays) ++ [
(self: super: { postgresql = self.postgresql_pam; }) # don’t put it as generic overlay for home-manager
];
_module.args = {
pkgsNext = import <nixpkgsNext> {};
pkgsPrevious = import <nixpkgsPrevious> {};
};
services.journald.extraConfig = ''
MaxLevelStore="warning"
MaxRetentionSec="1year"
'';
users.users =
builtins.listToAttrs (map (x: lib.attrsets.nameValuePair x.name ({
isNormalUser = true;
home = "/home/${x.name}";
createHome = true;
linger = true;
} // x)) (config.hostEnv.users pkgs))
// {
root.packages = let
nagios-cli = pkgs.writeScriptBin "nagios-cli" ''
#!${pkgs.stdenv.shell}
sudo -u naemon ${pkgs.nagios-cli}/bin/nagios-cli -c ${./monitoring/nagios-cli.cfg}
'';
in
[
pkgs.telnet
pkgs.htop
pkgs.iftop
pkgs.bind.dnsutils
pkgs.httpie
pkgs.iotop
pkgs.whois
pkgs.ngrep
pkgs.tcpdump
pkgs.tshark
pkgs.tcpflow
pkgs.mitmproxy
pkgs.nmap
pkgs.p0f
pkgs.socat
pkgs.lsof
pkgs.psmisc
pkgs.openssl
pkgs.wget
pkgs.cnagios
nagios-cli
];
};
users.mutableUsers = false;
environment.etc.cnagios.source = "${pkgs.cnagios}/share/doc/cnagios";
environment.systemPackages = [
pkgs.git
pkgs.vim
] ++
(lib.optional (builtins.length (config.hostEnv.users pkgs) > 0) pkgs.home-manager);
};
}
|