2023-10-16 10:33:47 +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 + "/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" ];
|
|
|
|
|
boot.kernelModules = [ "kvm-intel" ];
|
|
|
|
|
boot.extraModulePackages = [ ];
|
|
|
|
|
boot.tmp.useTmpfs = false;
|
|
|
|
|
boot.tmp.cleanOnBoot = true;
|
|
|
|
|
zramSwap.enable = true;
|
|
|
|
|
|
|
|
|
|
services.btrfs.autoScrub = {
|
|
|
|
|
enable = true;
|
|
|
|
|
interval = "monthly";
|
|
|
|
|
fileSystems = [
|
|
|
|
|
"/"
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
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."/srv" =
|
|
|
|
|
{ device = "/dev/disk/by-label/NIXROOT";
|
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async" ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fileSystems."/var" =
|
|
|
|
|
{ device = "/dev/disk/by-label/NIXROOT";
|
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@var,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."/swap" =
|
|
|
|
|
{ device = "/dev/disk/by-label/NIXROOT";
|
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@swap,discard=async" ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fileSystems."/mnt/snapshots/root" =
|
|
|
|
|
{ device = "/dev/disk/by-label/NIXROOT";
|
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async" ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
swapDevices = [ ];
|
|
|
|
|
|
|
|
|
|
systemd.network = {
|
|
|
|
|
enable = true;
|
|
|
|
|
networks = {
|
|
|
|
|
"10-lan" = {
|
2023-10-16 17:05:17 +02:00
|
|
|
|
matchConfig.Name = "enp6s18";
|
|
|
|
|
ntp = [ "192.168.101.1" ];
|
2024-06-02 12:27:03 +02:00
|
|
|
|
#domains = [ "home.opel-online.de" ];
|
2023-10-16 10:33:47 +02:00
|
|
|
|
networkConfig = {
|
|
|
|
|
DHCP = "yes";
|
|
|
|
|
IPv6AcceptRA = true;
|
|
|
|
|
};
|
2024-06-02 12:27:03 +02:00
|
|
|
|
dns = [
|
2024-06-08 19:32:33 +02:00
|
|
|
|
"192.168.101.1"
|
2024-06-02 12:27:03 +02:00
|
|
|
|
];
|
2023-10-16 10:33:47 +02:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
networking = {
|
|
|
|
|
useDHCP = false; # Deprecated
|
|
|
|
|
hostName = "dmz";
|
|
|
|
|
firewall = {
|
|
|
|
|
enable = true;
|
|
|
|
|
allowedUDPPorts = [ ];
|
2024-05-31 19:46:43 +02:00
|
|
|
|
allowedTCPPorts = [ 80 443 ];
|
2023-10-16 10:33:47 +02:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|