2022-11-05 10:25:12 +01: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 =
|
2022-11-26 21:16:39 +01:00
|
|
|
|
[ (modulesPath + "/profiles/qemu-guest.nix")
|
2022-11-05 10:25:12 +01:00
|
|
|
|
];
|
|
|
|
|
|
2022-12-06 22:24:15 +01:00
|
|
|
|
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "ahci" "sd_mod" "sr_mod" ];
|
2022-11-05 10:25:12 +01:00
|
|
|
|
boot.initrd.kernelModules = [ "vfio_pci" "vfio" "vfio_iommu_type1" "vfio_virqfd" ];
|
2022-12-06 22:24:15 +01:00
|
|
|
|
boot.kernelModules = [ "kvm-amd" ];
|
2022-11-05 10:25:12 +01:00
|
|
|
|
boot.extraModulePackages = [ ];
|
2023-01-07 08:38:47 +01:00
|
|
|
|
boot.tmpOnTmpfs = true;
|
2022-11-05 10:25:12 +01:00
|
|
|
|
|
|
|
|
|
fileSystems."/" =
|
2022-11-19 21:38:55 +01:00
|
|
|
|
{ device = "/dev/disk/by-label/NIXROOT";
|
2022-11-05 10:25:12 +01:00
|
|
|
|
fsType = "btrfs";
|
2022-11-19 21:38:55 +01:00
|
|
|
|
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async" ];
|
2022-11-05 10:25:12 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fileSystems."/home" =
|
2022-11-19 21:38:55 +01:00
|
|
|
|
{ device = "/dev/disk/by-label/NIXROOT";
|
2022-11-05 10:25:12 +01:00
|
|
|
|
fsType = "btrfs";
|
2022-11-19 21:38:55 +01:00
|
|
|
|
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async" ];
|
2022-11-05 10:25:12 +01:00
|
|
|
|
};
|
|
|
|
|
|
2022-11-19 21:38:55 +01:00
|
|
|
|
fileSystems."/home/.snapshots" =
|
|
|
|
|
{ device = "/dev/disk/by-label/NIXROOT";
|
2022-11-05 10:25:12 +01:00
|
|
|
|
fsType = "btrfs";
|
2022-11-19 21:38:55 +01:00
|
|
|
|
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@snapshots,discard=async" ];
|
2022-11-05 10:25:12 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fileSystems."/srv" =
|
2022-11-19 21:38:55 +01:00
|
|
|
|
{ device = "/dev/disk/by-label/NIXROOT";
|
2022-11-05 10:25:12 +01:00
|
|
|
|
fsType = "btrfs";
|
2022-11-19 21:38:55 +01:00
|
|
|
|
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" ];
|
2022-11-05 10:25:12 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
swapDevices = [ ];
|
|
|
|
|
|
|
|
|
|
networking = {
|
|
|
|
|
useDHCP = false; # Deprecated
|
2022-11-19 21:38:55 +01:00
|
|
|
|
hostName = "dmz";
|
2022-12-27 20:14:42 +01:00
|
|
|
|
domain = "kabtop.de";
|
2022-11-05 10:25:12 +01:00
|
|
|
|
networkmanager = {
|
2022-12-28 16:29:12 +01:00
|
|
|
|
enable = false;
|
2022-11-05 10:25:12 +01:00
|
|
|
|
};
|
|
|
|
|
interfaces = {
|
2022-12-06 22:24:15 +01:00
|
|
|
|
ens18 = {
|
|
|
|
|
useDHCP = false; # 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;
|
|
|
|
|
} ];
|
2022-11-05 10:25:12 +01:00
|
|
|
|
};
|
|
|
|
|
};
|
2022-12-06 22:24:15 +01:00
|
|
|
|
defaultGateway = "45.142.114.1";
|
2022-12-28 16:29:12 +01:00
|
|
|
|
defaultGateway6 = {
|
|
|
|
|
address = "fe80::1";
|
|
|
|
|
interface = "ens18";
|
|
|
|
|
};
|
|
|
|
|
|
2022-12-06 22:24:15 +01:00
|
|
|
|
nameservers = [ "9.9.9.9" "2620:fe::fe" ];
|
|
|
|
|
firewall = {
|
|
|
|
|
enable = true;
|
|
|
|
|
allowedUDPPorts = [ ];
|
2022-12-27 21:15:04 +01:00
|
|
|
|
allowedTCPPorts = [ 80 443 ];
|
2022-12-06 22:24:15 +01:00
|
|
|
|
};
|
2022-11-05 10:25:12 +01:00
|
|
|
|
};
|
|
|
|
|
|
2022-12-06 22:24:15 +01:00
|
|
|
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
2022-11-05 10:25:12 +01:00
|
|
|
|
}
|