2023-09-02 15:33:36 +02:00
{ config , pkgs , . . . }:
{
2024-08-23 14:38:42 +02:00
imports = [
# DNS settings.
2024-09-24 16:21:49 +02:00
# TODO add nix option
2024-08-23 14:38:42 +02:00
./dns.nix
2024-09-24 16:21:49 +02:00
#./dns-unencrypted.nix
2024-08-23 14:38:42 +02:00
# Nix garbage collection.
./nix-gc.nix
2024-09-04 22:12:26 +02:00
# Display contact information during boot.
./initrd-contact-info.nix
2024-08-23 14:38:42 +02:00
] ;
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 = " E u r o p e / B e r l i n " ;
# Select internationalisation properties.
i18n . defaultLocale = " e n _ U S . U T F - 8 " ;
i18n . extraLocaleSettings = {
LC_ADDRESS = " d e _ D E . U T F - 8 " ;
LC_IDENTIFICATION = " d e _ D E . U T F - 8 " ;
LC_MEASUREMENT = " d e _ D E . U T F - 8 " ;
LC_MONETARY = " d e _ D E . U T F - 8 " ;
LC_NAME = " d e _ D E . U T F - 8 " ;
LC_NUMERIC = " d e _ D E . U T F - 8 " ;
LC_PAPER = " d e _ D E . U T F - 8 " ;
LC_TELEPHONE = " d e _ D E . U T F - 8 " ;
LC_TIME = " d e _ D E . U T F - 8 " ;
} ;
2023-10-24 20:06:36 +02:00
console = {
#font = "Lat2-Terminus16";
# Configure console keymap.
keyMap = " d e - l a t i n 1 - n o d e a d k e y s " ;
} ;
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 = " Y o d a " ;
extraGroups = [ " n e t w o r k m a n a g e r " " w h e e l " ] ;
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 = 8 0 0 M
MaxFileSec = 7 day
'' ;
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
}