108 lines
3.1 KiB
Nix
108 lines
3.1 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 = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
|||
|
boot.initrd.kernelModules = [ "vfio_pci" "vfio" "vfio_iommu_type1" "vfio_virqfd" ];
|
|||
|
boot.kernelModules = [ "kvm-intel" ];
|
|||
|
boot.extraModulePackages = [ ];
|
|||
|
boot.tmpOnTmpfs = true;
|
|||
|
zramSwap.enable = true;
|
|||
|
|
|||
|
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";
|
|||
|
};
|
|||
|
|
|||
|
fileSystems."/mnt/Herkules" =
|
|||
|
{ device = "truenas:/mnt/Herkules";
|
|||
|
fsType = "nfs";
|
|||
|
options = [ "noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec" ];
|
|||
|
};
|
|||
|
|
|||
|
fileSystems."/mnt/Nova" =
|
|||
|
{ device = "truenas:/mnt/Nova";
|
|||
|
fsType = "nfs";
|
|||
|
options = [ "noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec" ];
|
|||
|
};
|
|||
|
|
|||
|
|
|||
|
swapDevices = [ ];
|
|||
|
|
|||
|
networking = {
|
|||
|
useDHCP = false; # Deprecated
|
|||
|
hostName = "nas";
|
|||
|
domain = "kabtop.de";
|
|||
|
networkmanager = {
|
|||
|
enable = false;
|
|||
|
};
|
|||
|
interfaces = {
|
|||
|
ens18 = {
|
|||
|
useDHCP = true; # For versatility sake, manually edit IP on nm-applet.
|
|||
|
# ipv4.addresses = [ {
|
|||
|
# address = "45.142.114.153";
|
|||
|
# prefixLength = 24;
|
|||
|
# } ];
|
|||
|
# ipv6.addresses = [ {
|
|||
|
# address = "2a00:ccc1:101:19D::2";
|
|||
|
# prefixLength = 64;
|
|||
|
# } ];
|
|||
|
# };
|
|||
|
# };
|
|||
|
# defaultGateway = "45.142.114.1";
|
|||
|
# defaultGateway6 = {
|
|||
|
# address = "fe80::1";
|
|||
|
# interface = "ens18";
|
|||
|
# };
|
|||
|
#
|
|||
|
# nameservers = [ "9.9.9.9" "2620:fe::fe" ];
|
|||
|
};
|
|||
|
|
|||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|||
|
}
|