nixcfg/nix/configuration.nix

99 lines
2.7 KiB
Nix
Raw Normal View History

2021-11-01 21:56:32 +00: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 10:49:28 +00:00
{ config, pkgs, ... } @ args:
2021-11-01 21:56:32 +00:00
2021-11-02 10:49:28 +00:00
# Configuration local for this cluster node (hostname, IP, etc)
2021-11-01 21:56:32 +00: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 15:40:19 +00: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 21:56:32 +00: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 16:33:54 +00:00
2021-11-01 21:56:32 +00: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 19:14:55 +00:00
boot.kernel.sysctl = {
"vm.max_map_count" = 262144;
2022-10-14 06:38:19 +00:00
"net.ipv6.conf.all.accept_ra" = 0;
"net.ipv6.conf.all.autoconf" = 0;
"net.ipv6.conf.all.use_tempaddr" = 0;
2022-02-26 19:14:55 +00:00
};
services.journald.extraConfig = ''
SystemMaxUse=1G
'';
2021-11-01 21:56:32 +00:00
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
2021-12-26 12:23:01 +00:00
nmap
bind
inetutils
pciutils
2021-11-01 21:56:32 +00:00
vim
tmux
2021-11-02 16:33:54 +00:00
ncdu
iotop
2021-11-02 19:45:21 +00:00
jnettop
nethogs
2021-11-01 21:56:32 +00:00
wget
htop
2022-02-10 15:57:16 +00:00
smartmontools
2022-07-27 09:18:23 +00:00
links2
2021-11-01 21:56:32 +00:00
git
2021-12-30 12:27:39 +00:00
rclone
2021-11-16 16:39:23 +00:00
docker-compose
2022-07-27 09:18:23 +00:00
wireguard-tools
#qemu
#qemu_kvm
2021-11-01 21:56:32 +00:00
];
2021-11-02 09:18:03 +00:00
programs.vim.defaultEditor = true;
2021-11-01 21:56:32 +00:00
# Enable network time
2022-09-08 08:35:06 +00:00
services.ntp.enable = false;
services.timesyncd.enable = true;
2021-11-01 21:56:32 +00:00
2021-12-26 12:23:01 +00:00
# Enable the OpenSSH daemon and disable password login.
2021-11-01 21:56:32 +00:00
services.openssh.enable = true;
2021-12-26 12:23:01 +00:00
services.openssh.passwordAuthentication = false;
2022-10-16 11:25:46 +00:00
virtualisation.docker = {
enable = true;
extraOptions = "--config-file=${pkgs.writeText "daemon.json" (builtins.toJSON {
dns = [ "172.17.0.1" "8.8.8.8" "8.8.4.4" ];
})}";
};
2021-11-01 21:56:32 +00:00
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "21.05"; # Did you read the comment?
}