89 lines
2.5 KiB
Nix
89 lines
2.5 KiB
Nix
#
|
||
# 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 + "/profiles/qemu-guest.nix")
|
||
];
|
||
|
||
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk" ];
|
||
boot.initrd.kernelModules = [ "vfio_pci" "vfio" "vfio_iommu_type1" "vfio_virqfd" ];
|
||
boot.kernelModules = [ "kvm-intel" ];
|
||
boot.extraModulePackages = [ ];
|
||
|
||
fileSystems."/" =
|
||
{ device = "/dev/disk/by-label/NIXROOT";
|
||
fsType = "btrfs";
|
||
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async" ];
|
||
};
|
||
|
||
fileSystems."/home" =
|
||
{ device = "/dev/disk/by-label/NIXROOT";
|
||
fsType = "btrfs";
|
||
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async" ];
|
||
};
|
||
|
||
fileSystems."/home/.snapshots" =
|
||
{ device = "/dev/disk/by-label/NIXROOT";
|
||
fsType = "btrfs";
|
||
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@snapshots,discard=async" ];
|
||
};
|
||
|
||
fileSystems."/srv" =
|
||
{ device = "/dev/disk/by-label/NIXROOT";
|
||
fsType = "btrfs";
|
||
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async" ];
|
||
};
|
||
|
||
fileSystems."/nix" =
|
||
{ device = "/dev/disk/by-label/NIXROOT";
|
||
fsType = "btrfs";
|
||
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async" ];
|
||
};
|
||
|
||
fileSystems."/boot" =
|
||
{ device = "/dev/disk/by-label/NIXBOOT";
|
||
fsType = "vfat";
|
||
};
|
||
|
||
|
||
swapDevices = [ ];
|
||
|
||
networking = {
|
||
useDHCP = false; # Deprecated
|
||
hostName = "dmz";
|
||
networkmanager = {
|
||
enable = true;
|
||
};
|
||
interfaces = {
|
||
enp6s18 = {
|
||
useDHCP = true; # For versatility sake, manually edit IP on nm-applet.
|
||
#ipv4.addresses = [ {
|
||
# address = "192.168.0.51";
|
||
# prefixLength = 24;
|
||
#} ];
|
||
};
|
||
};
|
||
#defaultGateway = "192.168.0.1";
|
||
#nameservers = [ "192.168.0.4" ];
|
||
#firewall = {
|
||
# enable = false;
|
||
# #allowedUDPPorts = [ 53 67 ];
|
||
# #allowedTCPPorts = [ 53 80 443 9443 ];
|
||
#};
|
||
};
|
||
|
||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||
}
|