nix-git/hosts/pi3bplus/configuration.nix

73 lines
2.3 KiB
Nix
Raw Permalink Normal View History

2023-10-24 20:04:49 +02:00
{ config, pkgs, lib, ... }:
2023-10-24 10:03:57 +02:00
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
2023-10-24 20:04:49 +02:00
boot = {
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
loader.grub.enable = false;
# Enables the generation of /boot/extlinux/extlinux.conf
loader.generic-extlinux-compatible.enable = true;
kernelPackages = pkgs.linuxPackages_latest;
supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ];
2023-10-30 10:29:06 +01:00
# Delete all files in /tmp during boot.
tmp.cleanOnBoot = true;
2023-10-24 20:04:49 +02:00
};
2023-10-24 10:03:57 +02:00
networking.hostName = "pi3bplus"; # Define your hostname.
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
# Set your time zone.
time.timeZone = "Europe/Berlin";
# Select internationalisation properties.
2023-10-24 20:04:49 +02:00
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";
};
console = {
#font = "Lat2-Terminus16";
keyMap = "de-latin1-nodeadkeys";
};
2023-10-24 10:03:57 +02:00
# Define a user account. Don't forget to set a password with 'passwd'.
users.users."yoda" = {
isNormalUser = true;
2023-10-24 20:04:49 +02:00
description = "Yoda";
2023-10-24 10:03:57 +02:00
extraGroups = [ "wheel" ]; # Enable 'sudo' for the user.
};
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
2023-10-24 20:04:49 +02:00
settings.PasswordAuthentication = false;
2023-10-24 10:03:57 +02:00
};
users.users.root.openssh.authorizedKeys.keys = [
(builtins.readFile ./assets/ssh/nitrokey.pub)
];
2023-10-24 20:04:49 +02:00
hardware.enableRedistributableFirmware = true;
2023-10-24 10:03:57 +02:00
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
2024-02-07 14:29:55 +01:00
# Most users should never change this value after the initial install, for any reason, even if you've upgraded your system to a new NixOS release.
2023-12-15 13:03:18 +01:00
system.stateVersion = "23.11";
2023-10-24 10:03:57 +02:00
}