add pi3bplus

This commit is contained in:
Daniel Langbein 2023-10-24 20:04:49 +02:00
parent 629c6134f3
commit 3d5acb67c4
Signed by: langfingaz
GPG Key ID: 6C47C753F0823002
2 changed files with 31 additions and 64 deletions

View File

@ -1,19 +1,19 @@
# Edit this configuration file to define what should be installed on { config, pkgs, lib, ... }:
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running `nixos-help`).
{ config, pkgs, ... }:
{ {
imports = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
boot = {
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default) # Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
boot.loader.grub.enable = false; loader.grub.enable = false;
# Enables the generation of /boot/extlinux/extlinux.conf # Enables the generation of /boot/extlinux/extlinux.conf
boot.loader.generic-extlinux-compatible.enable = true; loader.generic-extlinux-compatible.enable = true;
kernelPackages = pkgs.linuxPackages_latest;
supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ];
};
networking.hostName = "pi3bplus"; # Define your hostname. networking.hostName = "pi3bplus"; # Define your hostname.
# Pick only one of the below networking options. # Pick only one of the below networking options.
@ -23,76 +23,42 @@
# Set your time zone. # Set your time zone.
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties. # Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
# console = { 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"; #font = "Lat2-Terminus16";
# keyMap = "us"; keyMap = "de-latin1-nodeadkeys";
# useXkbConfig = true; # use xkbOptions in tty. };
# };
# Enable the X11 windowing system.
# services.xserver.enable = true;
# Configure keymap in X11
# services.xserver.layout = "us";
# services.xserver.xkbOptions = "eurosign:e,caps:escape";
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
# sound.enable = true;
# hardware.pulseaudio.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with 'passwd'. # Define a user account. Don't forget to set a password with 'passwd'.
users.users."yoda" = { users.users."yoda" = {
isNormalUser = true; isNormalUser = true;
description = "Yoda";
extraGroups = [ "wheel" ]; # Enable 'sudo' for the user. extraGroups = [ "wheel" ]; # Enable 'sudo' for the user.
#packages = with pkgs; [
# firefox
# tree
#];
}; };
# List packages installed in system profile. To search, run:
# $ nix search wget
# environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
# ];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
services.openssh = { services.openssh = {
enable = true; enable = true;
passwordAuthentication = false; settings.PasswordAuthentication = false;
}; };
users.users.root.openssh.authorizedKeys.keys = [ users.users.root.openssh.authorizedKeys.keys = [
(builtins.readFile ./assets/ssh/nitrokey.pub) (builtins.readFile ./assets/ssh/nitrokey.pub)
]; ];
# Open ports in the firewall. hardware.enableRedistributableFirmware = true;
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system # Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you # (/run/current-system/configuration.nix). This is useful in case you

View File

@ -12,6 +12,7 @@
<nixpkgs/nixos/modules/installer/sd-card/sd-image-aarch64.nix> <nixpkgs/nixos/modules/installer/sd-card/sd-image-aarch64.nix>
]; ];
boot = { boot = {
# Downstream Raspberry Pi 3 kernel.
# New tags are published not so often ... # New tags are published not so often ...
# https://github.com/raspberrypi/linux/tags # https://github.com/raspberrypi/linux/tags
#kernelPackages = pkgs.linuxKernel.packages.linux_rpi3; #kernelPackages = pkgs.linuxKernel.packages.linux_rpi3;
@ -31,7 +32,7 @@
sdImage.compressImage = false; sdImage.compressImage = false;
services.openssh = { services.openssh = {
enable = true; enable = true;
passwordAuthentication = false; settings.PasswordAuthentication = false;
}; };
users.users.root.openssh.authorizedKeys.keys = [ users.users.root.openssh.authorizedKeys.keys = [
(builtins.readFile ./assets/ssh/nitrokey.pub) (builtins.readFile ./assets/ssh/nitrokey.pub)