nix-git/modules/base.nix

87 lines
2.6 KiB
Nix
Raw Normal View History

2023-09-02 15:33:36 +02:00
{ config, pkgs, ... }:
{
2024-08-23 14:38:42 +02:00
imports = [
# DNS settings.
./dns.nix
# Nix garbage collection.
./nix-gc.nix
];
2023-09-20 23:02:49 +02:00
# Firmware.
2023-09-25 22:52:32 +02:00
#
2024-02-04 14:53:41 +01:00
# The list of hardware.enableAllFirmware contains non-redistributable licensed firmware files.
# This requires nixpkgs.config.allowUnfree to be true.
# An alternative is to use the hardware.enableRedistributableFirmware option.
hardware.enableAllFirmware = false;
#
2023-09-20 23:02:49 +02:00
# Enables e.g. Intel microcode updates.
2023-09-25 22:52:32 +02:00
# Defaults to `config.hardware.enableAllFirmware`.
2024-02-04 14:53:41 +01:00
hardware.enableRedistributableFirmware = true;
2023-09-25 22:52:32 +02:00
2024-08-13 14:46:55 +02:00
# Allow **all** unfree packages.
# To whitelist individual unfree packages, see ./unfree.nix
2024-02-04 14:53:41 +01:00
nixpkgs.config.allowUnfree = false;
2023-09-20 23:02:49 +02:00
2023-09-02 15:33:36 +02:00
# Enables wireless support via wpa_supplicant.
# networking.wireless.enable = true;
# Enable networking.
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Europe/Berlin";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
2023-10-24 20:06:36 +02:00
console = {
#font = "Lat2-Terminus16";
# Configure console keymap.
keyMap = "de-latin1-nodeadkeys";
};
2023-09-02 15:33:36 +02:00
2023-11-03 15:22:09 +01:00
# Define a user account.
# Don't forget to set a password with `passwd`.
2023-09-02 15:33:36 +02:00
users.users.yoda = {
isNormalUser = true;
description = "Yoda";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
# Nix dependency management.
niv
];
};
2023-09-17 15:34:06 +02:00
# SystemMaxFileSize: Defaults to one eighth of the values configured with SystemMaxUse= and RuntimeMaxUse=, so that usually seven rotated journal files are kept as history.
# MaxFileSec: To ensure that not too much data is lost at once when old journal files are deleted, it might make sense to change this value from the default of one month.
# https://www.freedesktop.org/software/systemd/man/journald.conf.html
services.journald.extraConfig = ''
SystemMaxUse=800M
MaxFileSec=7day
'';
2023-09-02 15:33:36 +02:00
nix.settings.auto-optimise-store = true;
2023-10-24 20:06:36 +02:00
# Delete all files in /tmp during boot.
boot.tmp.cleanOnBoot = true;
2024-02-07 14:29:55 +01:00
# Whether to install NixOS's own documentation.
2024-01-18 11:53:04 +01:00
documentation.nixos.enable = false;
2023-09-20 15:38:13 +02:00
# Firewall.
# https://nixos.wiki/wiki/Firewall
2024-01-16 15:43:45 +01:00
# Note: Firewall rules may be bypassed/overwritten by Docker, as per https://github.com/NixOS/nixpkgs/issues/111852
2023-09-20 15:38:13 +02:00
networking.firewall.enable = true;
2023-09-02 15:33:36 +02:00
}