remote-display-pi/configuration.nix
2024-01-27 10:53:10 +01:00

97 lines
2.0 KiB
Nix

{ stable, config, pkgs, lib, ... }:
let
SSID = "mywifi";
SSIDpassword = "mypassword";
interface = "wlan0";
hostname = "nixpi";
in {
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";
};
console.keyMap = "de";
services.xserver = {
layout = "de";
xkbVariant = "";
};
boot = {
kernelPackages = pkgs.linuxKernel.packages.linux_rpi4;
initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" ];
loader = {
grub.enable = false;
generic-extlinux-compatible.enable = true;
};
};
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
options = [ "noatime" ];
};
};
networking = {
hostName = hostname;
wireless = {
enable = true;
networks."${SSID}".psk = SSIDpassword;
interfaces = [ interface ];
};
};
environment.systemPackages = with pkgs; [ vim ];
services.openssh.enable = true;
programs.xonsh.enable = true;
users = {
mutableUsers = false;
users."pi" = {
shell = pkgs.xonsh;
isNormalUser = true;
hashedPassword = "$y$j9T$ODBtPwWjIx50Bjhctw9kW/$jhfsHaAyh8zOXBV7cCK9l2M0yWyE3VLiL0h55XXV5J2";
extraGroups = [ "wheel" ];
};
};
hardware.enableRedistributableFirmware = true;
system.stateVersion = "23.11";
environment.systemPackages = with pkgs; [
wget
hyfetch
usbutils
pciutils
git
btop
git-lfs
lm_sensors
file
raspberrypi-eeprom
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nixpkgs.config.allowUnfree = true;
boot.tmp.cleanOnBoot = true;
zramSwap.enable = true;
}