1 { pkgs, lib, config, ... }:
2 let inherit (lib) types;
7 ./defaults/predictable-interface-names.nix
11 autoOptimiseStore = true;
12 #binaryCaches = lib.mkForce [];
15 # Use gc.automatic to keep disk space under control.
19 options = "--delete-older-than 30d";
22 "nixpkgs=${pkgs.path}"
30 packageOverrides = pkgs: {
31 postfix = pkgs.postfix.override {
37 #overlays = import ../overlays.nix;
40 documentation.nixos = {
41 enable = false; # NOTE: useless on a server, and CPU intensive.
44 # Clean /tmp automatically on boot.
45 boot.cleanTmpDir = true;
48 timeZone = "Europe/Paris";
52 consoleFont = "Lat2-Terminus16";
54 defaultLocale = "fr_FR.UTF-8";
60 passwordAuthentication = false;
72 systemPackages = with pkgs; [
91 etc."inputrc".text = lib.readFile defaults/readline/inputrc;
96 interactiveShellInit = ''
97 bind '"\e[A":history-search-backward'
98 bind '"\e[B":history-search-forward'
100 # Ignore duplicate commands, ignore commands starting with a space
101 export HISTCONTROL=erasedups:ignorespace
102 export HISTSIZE=42000
104 # Append to the history instead of overwriting (good for multiple connections)
111 ls = "ls --color=tty";
112 mem = "ps -e -orss=,user=,args= | sort -b -k1,1n";
115 s-u="systemctl --user";
117 nixos-clean="sudo nix-collect-garbage -d";
118 nixos-history="sudo nix-env --list-generations --profile /nix/var/nix/profiles/system";
119 nixos-rollback="sudo nixos-rebuild switch --rollback";
120 nixos-update="sudo nix-channel --update";
121 nixos-upgrade="sudo nixos-rebuild switch";
122 nixos-upstream="sudo nix-channel --list";