Initial pi config
This commit is contained in:
44
hosts/pi/default.nix
Normal file
44
hosts/pi/default.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib.my;
|
||||
{
|
||||
imports = [
|
||||
<nixos-hardware/raspberry-pi/4>
|
||||
./hardware-configuration.nix
|
||||
../server.nix
|
||||
];
|
||||
|
||||
networking.hostName = "pi";
|
||||
networking.hostId = "";
|
||||
|
||||
hardware = {
|
||||
raspberry-pi."4" = {
|
||||
apply-overlays-dtmerge.enable = true;
|
||||
audio.enable = true;
|
||||
fkms-3d.enable = true;
|
||||
};
|
||||
deviceTree = {
|
||||
enable = true;
|
||||
filter = "*rpi-4-*.dtb";
|
||||
};
|
||||
};
|
||||
|
||||
sound.enable = true;
|
||||
console.enable = false;
|
||||
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
libraspberrypi
|
||||
raspberrypi-eeprom
|
||||
];
|
||||
|
||||
system.stateVersion = "22.11";
|
||||
}
|
||||
|
16
hosts/pi/hardware-configuration.nix
Normal file
16
hosts/pi/hardware-configuration.nix
Normal file
@ -0,0 +1,16 @@
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
<nixos-hardware/raspberry-pi/4>
|
||||
];
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/NIXOS_SD";
|
||||
fsType = "ext4";
|
||||
options = [ "noatime" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user