Switch pulsebert to dell mini

This commit is contained in:
Sandro - 2022-08-24 00:32:00 +02:00
parent 4733360cdb
commit bdbfef3bc5
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
3 changed files with 32 additions and 77 deletions

View File

@ -509,12 +509,9 @@
pulsebert = nixosSystem' {
modules = [
./hosts/pulsebert
# build: outputs.nixosConfigurations.pulsebert.config.system.build.sdImage
# run: unzstd -cd result/sd-image/nixos-sd-image-*-aarch64-linux.img.zst | pv -br | sudo dd bs=4M of=/dev/sdX
"${inputs.nixos-unstable}/nixos/modules/installer/sd-card/sd-image-aarch64-new-kernel.nix"
];
nixpkgs = inputs.nixos-unstable;
system = "aarch64-linux";
system = "x86_64-linux";
};
radiobert = nixosSystem' {

View File

@ -8,37 +8,26 @@
c3d2 = {
isInHq = true;
mergeHostsFile = true;
hq.interface = "eth0";
hq.interface = "enp1s0";
hq.statistics.enable = true;
k-ot.enable = true;
audioServer.enable = true;
};
boot = {
growPartition = true;
loader = {
grub.enable = false;
loader.systemd-boot = {
enable = true;
configurationLimit = 2;
};
kernelPackages = lib.mkForce pkgs.linuxPackages_latest;
# No ZFS on latest kernel:
supportedFilesystems = lib.mkForce [ "vfat" "ext4" ];
kernelParams = [ "console=tty0" ];
loader.efi.canTouchEfiVariables = true;
kernelPackages = pkgs.linuxPackages_latest;
tmpOnTmpfs = true;
};
hardware.deviceTree = {
enable = true;
kernelPackage = config.boot.kernelPackages.kernel;
};
nixpkgs.config.packageOverrides = pkgs: {
makeModulesClosure = x:
# prevent kernel install fail due to missing modules
pkgs.makeModulesClosure (x // { allowMissing = true; });
};
hardware.enableRedistributableFirmware = true;
nix = {
buildCores = 4;
buildCores = 2;
maxJobs = 1;
};
@ -55,19 +44,13 @@
];
};
hostName = "pulsebert";
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
useDHCP = false;
interfaces = {
eth0.useDHCP = true;
wlan0.useDHCP = false; # broken
enp1s0.useDHCP = true;
};
};
environment.systemPackages = with pkgs; [
libraspberrypi
mpd
mpv
ncmpcpp
@ -85,23 +68,12 @@
};
};
# quirk for this pi3
systemd.services.bluetooth.serviceConfig = {
Restart = "always";
RestartSec = "1s";
};
users.users = lib.mkMerge [
(lib.optionalAttrs config.services.octoprint.enable {
# Allow access to printer serial port and GPIO
"${config.services.octoprint.user}".extraGroups = [ "dialout" ];
})
{
# Allow gpio group to access GPIO devices
gpio = {
isNormalUser = true;
group = "gpio";
};
}
];
@ -115,13 +87,6 @@
enable = true;
};
mjpg-streamer = {
# crashes with: MJPG-streamer [3040]: init_VideoIn failed
enable = false;
inputPlugin = "input_uvc.so -d /dev/v4l/by-id/usb-046d_0817_4B7115A0-video-index0 -r 640x480 -f 30 -pl 50hz -ex auto";
outputPlugin = "output_http.so -p 3020";
};
nginx = {
enable = true;
virtualHosts = {
@ -176,11 +141,7 @@
# #in p: [ octoprint-filament-sensor-universal ];
# in p: [];
};
udev.extraRules = ''
KERNEL=="gpiochip*", GROUP="gpio", MODE="0660"
'';
};
system.stateVersion = "21.05";
system.stateVersion = "22.11";
}

View File

@ -4,37 +4,34 @@
{ config, lib, pkgs, modulesPath, ... }:
{
#imports =
# [ (modulesPath + "/installer/scan/not-detected.nix")
# ];
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "usbhid" ];
boot.initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" "sdhci_acpi" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
# mkForce to get rid of "console=ttyAMA0" from sd-image-aarch64.nix
boot.kernelParams = lib.mkForce [
"snd_bcm2835.enable_headphones=1"
];
fileSystems."/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
};
fileSystems."/" =
{ device = "/dev/disk/by-uuid/dfa5920b-debc-4e60-a33b-ef6a1ef1ed48";
fsType = "ext4";
};
fileSystems."/boot/firmware" = {
device = "/dev/disk/by-label/FIRMWARE";
fsType = "vfat";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/D35A-D516";
fsType = "vfat";
};
swapDevices = [ ];
hardware.enableRedistributableFirmware = true;
#networking.wireless.enable = true;
boot.loader.raspberryPi.firmwareConfig = ''
gpu_mem=192
dtparam=audio=on
'';
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}