nixcfg/nix/configuration.nix

92 lines
2.2 KiB
Nix
Raw Normal View History

2021-11-01 22:56:32 +01:00
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
2021-11-02 11:49:28 +01:00
{ config, pkgs, ... } @ args:
2021-11-01 22:56:32 +01:00
2021-11-02 11:49:28 +01:00
# Configuration local for this cluster node (hostname, IP, etc)
2021-11-01 22:56:32 +01:00
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
# Include generic Deuxfleurs module
./deuxfleurs.nix
# Configuration for this deployment (a cluster)
./cluster.nix
2021-11-18 16:40:19 +01:00
# Configuration local for this Deuxfleurs site (set of nodes)
./site.nix
# Configuration local for this cluster node (hostname, IP, etc)
./node.nix
2021-11-01 22:56:32 +01:00
];
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.useDHCP = false;
2021-11-02 17:33:54 +01:00
2021-11-01 22:56:32 +01:00
# Set your time zone.
time.timeZone = "Europe/Paris";
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "sun12x22";
keyMap = "fr";
};
2022-02-26 20:14:55 +01:00
boot.kernel.sysctl = {
"vm.max_map_count" = 262144;
};
services.journald.extraConfig = ''
SystemMaxUse=1G
'';
2021-11-01 22:56:32 +01:00
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
2021-12-26 13:23:01 +01:00
nmap
bind
inetutils
pciutils
2021-11-01 22:56:32 +01:00
vim
tmux
2021-11-02 17:33:54 +01:00
ncdu
iotop
2021-11-02 20:45:21 +01:00
jnettop
nethogs
2021-11-01 22:56:32 +01:00
wget
htop
2022-02-10 16:57:16 +01:00
smartmontools
2022-07-27 11:18:23 +02:00
links2
2021-11-01 22:56:32 +01:00
git
2021-12-30 13:27:39 +01:00
rclone
2021-11-16 17:39:23 +01:00
docker-compose
2022-07-27 11:18:23 +02:00
wireguard-tools
2021-11-01 22:56:32 +01:00
];
# Enable support for all terminal emulators such as urxvt
environment.enableAllTerminfo = true;
2021-11-02 10:18:03 +01:00
programs.vim.defaultEditor = true;
2021-11-01 22:56:32 +01:00
# Enable network time
2022-09-08 10:35:06 +02:00
services.ntp.enable = false;
services.timesyncd.enable = true;
2021-11-01 22:56:32 +01:00
2021-12-26 13:23:01 +01:00
# Enable the OpenSSH daemon and disable password login.
2021-11-01 22:56:32 +01:00
services.openssh.enable = true;
2024-06-02 21:35:08 +02:00
services.openssh.settings.PasswordAuthentication = false;
2021-12-26 13:23:01 +01:00
2022-10-16 13:25:46 +02:00
virtualisation.docker = {
enable = true;
extraOptions = "--config-file=${pkgs.writeText "daemon.json" (builtins.toJSON {
dns = [ "172.17.0.1" ];
2022-10-16 13:25:46 +02:00
})}";
};
2023-03-24 12:01:38 +01:00
nix.gc.automatic = true;
nix.gc.options = "--delete-older-than 30d";
2021-11-01 22:56:32 +01:00
}