nix-git/modules/base.nix

97 lines
2.8 KiB
Nix
Raw Normal View History

2023-09-02 15:33:36 +02:00
{ config, pkgs, ... }:
{
2023-09-20 23:02:49 +02:00
# Firmware.
2023-09-25 22:52:32 +02:00
#
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`.
#hardware.enableRedistributableFirmware = true;
hardware.enableAllFirmware = true;
# Allow unfree packages.
nixpkgs.config.allowUnfree = true;
2023-09-20 23:02:49 +02:00
2023-09-02 15:33:36 +02:00
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Enables wireless support via wpa_supplicant.
# networking.wireless.enable = true;
# Enable networking.
networking.networkmanager.enable = true;
2023-09-16 12:53:10 +02:00
networking.nameservers = [
# https://www.kuketz-blog.de/empfehlungsecke/#dns
# dot.ffmuc.net (supports DNSSEC)
"5.1.66.255" "185.150.99.255"
# https://www.kuketz-blog.de/empfehlungsecke/#dns
# unfiltered.adguard-dns.com (supports DNSSEC)
"94.140.14.140" "94.140.14.141"
];
2023-09-02 15:33:36 +02:00
# 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
];
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
];
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-08 21:09:25 +02:00
# https://nixos.wiki/wiki/Storage_optimization#Automation
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
2023-10-24 20:06:36 +02:00
# Delete all files in /tmp during boot.
boot.tmp.cleanOnBoot = true;
2023-09-20 15:38:13 +02:00
# Firewall.
# https://nixos.wiki/wiki/Firewall
# -> Firewall rules may be overwritten by docker, as per https://github.com/NixOS/nixpkgs/issues/111852
networking.firewall.enable = true;
2023-09-02 15:33:36 +02:00
}