feat: migrate home-server to LattePanda 3 Delta
This commit is contained in:
parent
9fbea3db5c
commit
9693e762df
10 changed files with 112 additions and 42 deletions
|
@ -10,10 +10,4 @@
|
|||
|
||||
services.smartd.enable = true;
|
||||
services.smartd.notifications.x11.enable = true;
|
||||
|
||||
# Bluetooth
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.settings = {
|
||||
General = { Enable = "Source,Sink,Media,Socket"; };
|
||||
};
|
||||
}
|
||||
|
|
8
hardware/bluetooth.nix
Normal file
8
hardware/bluetooth.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.settings = {
|
||||
General = { Enable = "Source,Sink,Media,Socket"; };
|
||||
};
|
||||
}
|
|
@ -1,13 +1,22 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.opengl = {
|
||||
driSupport32Bit = true;
|
||||
extraPackages = with pkgs; [ vaapiIntel vaapiVdpau libvdpau-va-gl ];
|
||||
extraPackages32 = with pkgs.pkgsi686Linux; [
|
||||
vaapiIntel
|
||||
libvdpau-va-gl
|
||||
vaapiVdpau
|
||||
];
|
||||
boot.initrd.kernelModules = [ "i915" ];
|
||||
|
||||
nixpkgs.config.packageOverrides = pkgs: {
|
||||
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
||||
};
|
||||
|
||||
environment.variables = {
|
||||
VDPAU_DRIVER =
|
||||
lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl");
|
||||
};
|
||||
|
||||
hardware.opengl.extraPackages = with pkgs; [
|
||||
vaapiIntel
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
intel-media-driver
|
||||
intel-compute-runtime
|
||||
];
|
||||
}
|
||||
|
|
69
hardware/lattepanda.nix
Normal file
69
hardware/lattepanda.nix
Normal file
|
@ -0,0 +1,69 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"nvme"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"sdhci_pci"
|
||||
"rtsx_usb_sdmmc"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/70f03d67-e248-42f6-a204-c02e4f180531";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" "compress-force=zstd:1" "noatime" ];
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."enc".device =
|
||||
"/dev/disk/by-uuid/d3b12d0e-7e8e-4130-9a8f-680abcdc9682";
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-uuid/70f03d67-e248-42f6-a204-c02e4f180531";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@home" "compress-force=zstd:1" "noatime" ];
|
||||
};
|
||||
|
||||
fileSystems."/.swap" = {
|
||||
device = "/dev/disk/by-uuid/70f03d67-e248-42f6-a204-c02e4f180531";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@swap" "nodatacow" "noatime" ];
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
fileSystems."/.snapshots" = {
|
||||
device = "/dev/disk/by-uuid/70f03d67-e248-42f6-a204-c02e4f180531";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@snapshots" "compress-force=zstd:1" "noatime" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/95FC-D4E5";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [{
|
||||
device = "/.swap/swapfile";
|
||||
size = 8096;
|
||||
}];
|
||||
|
||||
# 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.enp2s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
# high-resolution display
|
||||
hardware.video.hidpi.enable = lib.mkDefault true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue