2022-09-17 16:50:50 +02:00
|
|
|
|
#
|
|
|
|
|
# Hardware settings for Teclast F5 10" Laptop
|
|
|
|
|
# NixOS @ sda2
|
|
|
|
|
#
|
|
|
|
|
# flake.nix
|
|
|
|
|
# └─ ./hosts
|
|
|
|
|
# └─ ./laptop
|
|
|
|
|
# └─ hardware-configuration.nix *
|
|
|
|
|
#
|
|
|
|
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
|
|
|
# and may be overwritten by future invocations. Please make changes
|
|
|
|
|
# to /etc/nixos/configuration.nix instead.
|
|
|
|
|
{ config, lib, pkgs, modulesPath, ... }:
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
imports =
|
|
|
|
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
|
|
|
|
];
|
|
|
|
|
|
2022-09-29 20:42:31 +02:00
|
|
|
|
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" "rtsx_usb_sdmmc" ];
|
2022-09-17 16:50:50 +02:00
|
|
|
|
boot.initrd.kernelModules = [ ];
|
|
|
|
|
boot.kernelModules = [ "kvm-intel" ];
|
|
|
|
|
boot.extraModulePackages = [ ];
|
|
|
|
|
|
|
|
|
|
fileSystems."/" =
|
2022-09-29 20:42:31 +02:00
|
|
|
|
{ device = "/dev/mapper/root";
|
2022-09-17 16:50:50 +02:00
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@" ];
|
|
|
|
|
};
|
|
|
|
|
|
2022-10-01 14:01:15 +02:00
|
|
|
|
boot.initrd.luks = {
|
|
|
|
|
fido2Support = true;
|
|
|
|
|
devices."root" = {
|
|
|
|
|
device = "/dev/disk/by-uuid/75eccc7f-30b0-4fe8-8f82-90edaf284cd5";
|
|
|
|
|
allowDiscards = true;
|
|
|
|
|
};
|
|
|
|
|
};
|
2022-09-29 20:42:31 +02:00
|
|
|
|
|
2022-09-17 16:50:50 +02:00
|
|
|
|
fileSystems."/home" =
|
2022-09-29 20:42:31 +02:00
|
|
|
|
{ device = "/dev/mapper/root";
|
2022-09-17 16:50:50 +02:00
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@home" ];
|
|
|
|
|
};
|
|
|
|
|
|
2022-09-29 20:42:31 +02:00
|
|
|
|
fileSystems."/opt" =
|
|
|
|
|
{ device = "/dev/mapper/root";
|
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@opt" ];
|
|
|
|
|
};
|
|
|
|
|
|
2022-09-18 17:11:13 +02:00
|
|
|
|
fileSystems."/srv" =
|
2022-09-29 20:42:31 +02:00
|
|
|
|
{ device = "/dev/mapper/root";
|
2022-09-18 17:11:13 +02:00
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv" ];
|
|
|
|
|
};
|
|
|
|
|
|
2022-09-17 16:50:50 +02:00
|
|
|
|
fileSystems."/boot" =
|
|
|
|
|
{ device = "/dev/disk/by-label/BOOT";
|
|
|
|
|
fsType = "vfat";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
swapDevices = [ ];
|
|
|
|
|
|
|
|
|
|
networking = {
|
|
|
|
|
useDHCP = false; # Deprecated
|
|
|
|
|
hostName = "nbf5";
|
2022-10-24 20:26:01 +02:00
|
|
|
|
wireless.iwd.enable = true;
|
|
|
|
|
networkmanager = {
|
|
|
|
|
enable = true;
|
|
|
|
|
wifi = {
|
|
|
|
|
backend = "iwd";
|
|
|
|
|
powersave = true;
|
|
|
|
|
};
|
|
|
|
|
};
|
2022-09-17 16:50:50 +02:00
|
|
|
|
interfaces = {
|
2022-09-29 20:42:31 +02:00
|
|
|
|
wlp1s0 = {
|
2022-09-17 16:50:50 +02:00
|
|
|
|
useDHCP = true; # For versatility sake, manually edit IP on nm-applet.
|
|
|
|
|
#ipv4.addresses = [ {
|
|
|
|
|
# address = "192.168.0.51";
|
|
|
|
|
# prefixLength = 24;
|
|
|
|
|
#} ];
|
|
|
|
|
};
|
2022-09-18 14:33:58 +02:00
|
|
|
|
# wlo1 = {
|
|
|
|
|
# useDHCP = true;
|
|
|
|
|
# #ipv4.addresses = [ {
|
|
|
|
|
# # address = "192.168.0.51";
|
|
|
|
|
# # prefixLength = 24;
|
|
|
|
|
# #} ];
|
|
|
|
|
# };
|
2022-09-17 16:50:50 +02:00
|
|
|
|
};
|
|
|
|
|
#defaultGateway = "192.168.0.1";
|
|
|
|
|
#nameservers = [ "192.168.0.4" ];
|
|
|
|
|
#firewall = {
|
|
|
|
|
# enable = false;
|
|
|
|
|
# #allowedUDPPorts = [ 53 67 ];
|
|
|
|
|
# #allowedTCPPorts = [ 53 80 443 9443 ];
|
|
|
|
|
#};
|
|
|
|
|
};
|
|
|
|
|
|
2022-09-18 14:33:58 +02:00
|
|
|
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
|
|
|
# high-resolution display
|
|
|
|
|
hardware.video.hidpi.enable = lib.mkDefault true;
|
|
|
|
|
}
|