2023-07-21 22:07:21 +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")
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ];
|
|
|
|
|
boot.initrd.kernelModules = [ ];
|
|
|
|
|
boot.kernelModules = [ "kvm-amd" ];
|
2023-07-27 21:26:41 +02:00
|
|
|
|
boot.extraModulePackages = [ ];
|
2023-09-23 09:19:56 +02:00
|
|
|
|
boot.tmp.useTmpfs = false;
|
|
|
|
|
boot.tmp.cleanOnBoot = true;
|
|
|
|
|
zramSwap.enable = true;
|
2023-07-23 20:12:02 +02:00
|
|
|
|
|
|
|
|
|
# services.btrfs.autoScrub = {
|
|
|
|
|
# enable = true;
|
|
|
|
|
# interval = "monthly";
|
|
|
|
|
# fileSystems = [
|
|
|
|
|
# "/"
|
|
|
|
|
# ];
|
|
|
|
|
# };
|
|
|
|
|
#
|
|
|
|
|
# services.btrbk = {
|
|
|
|
|
# instances = {
|
|
|
|
|
# hf = {
|
|
|
|
|
# onCalendar = "hourly";
|
|
|
|
|
# settings = {
|
|
|
|
|
# incremental = "yes";
|
|
|
|
|
# snapshot_create = "ondemand";
|
|
|
|
|
# snapshot_dir = "@snapshots";
|
|
|
|
|
# timestamp_format = "long";
|
|
|
|
|
#
|
|
|
|
|
# snapshot_preserve = "2m 2w 5d 5h";
|
|
|
|
|
# snapshot_preserve_min = "latest";
|
|
|
|
|
#
|
|
|
|
|
# volume = {
|
|
|
|
|
# "/mnt/snapshots/root" = {
|
|
|
|
|
# snapshot_create = "always";
|
|
|
|
|
# subvolume = {
|
|
|
|
|
# "@home" = {};
|
|
|
|
|
# };
|
|
|
|
|
# };
|
|
|
|
|
# };
|
|
|
|
|
# };
|
|
|
|
|
# };
|
|
|
|
|
# };
|
|
|
|
|
# };
|
2023-07-21 22:07:21 +02:00
|
|
|
|
|
2023-07-23 20:12:02 +02:00
|
|
|
|
# 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."/nix" =
|
|
|
|
|
# { device = "/dev/disk/by-label/NIXROOT";
|
|
|
|
|
# fsType = "btrfs";
|
|
|
|
|
# options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,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" ];
|
|
|
|
|
# };
|
2023-07-21 22:07:21 +02:00
|
|
|
|
|
|
|
|
|
fileSystems."/" =
|
|
|
|
|
{ device = "/dev/disk/by-label/NIXROOT";
|
2023-07-23 20:12:02 +02:00
|
|
|
|
fsType = "ext4";
|
|
|
|
|
options = [ "defaults,noatime" ];
|
2023-07-21 22:07:21 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fileSystems."/boot" =
|
|
|
|
|
{ device = "/dev/disk/by-label/NIXBOOT";
|
|
|
|
|
fsType = "vfat";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fileSystems."/sdcard" =
|
|
|
|
|
{ device = "/dev/disk/by-label/sdcard";
|
|
|
|
|
fsType = "ext4";
|
2023-07-23 20:12:02 +02:00
|
|
|
|
options = [ "nofail,x-systemd.automount" ];
|
2023-07-21 22:07:21 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fileSystems."/mnt/Pluto" =
|
|
|
|
|
{ device = "nas:/Pluto";
|
|
|
|
|
fsType = "nfs";
|
2023-07-23 20:12:02 +02:00
|
|
|
|
options = [ "nofail,noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2" ];
|
2023-07-21 22:07:21 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fileSystems."/mnt/Mars" =
|
2023-09-03 19:39:29 +02:00
|
|
|
|
{ device = "jupiter:/Mars";
|
2023-07-21 22:07:21 +02:00
|
|
|
|
fsType = "nfs";
|
2023-07-23 20:12:02 +02:00
|
|
|
|
options = [ "nofail,noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2" ];
|
2023-07-21 22:07:21 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
swapDevices = [
|
|
|
|
|
{ device = "/dev/disk/by-label/NIXSWAP"; }
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
networking = {
|
|
|
|
|
useDHCP = false; # Deprecated
|
|
|
|
|
hostName = "nix-steamdeck";
|
|
|
|
|
wireless.iwd.enable = true;
|
|
|
|
|
networkmanager = {
|
|
|
|
|
enable = true;
|
|
|
|
|
wifi = {
|
|
|
|
|
backend = "iwd";
|
|
|
|
|
powersave = true;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
# interfaces = {
|
|
|
|
|
# wlan0 = {
|
|
|
|
|
# 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 = {
|
|
|
|
|
checkReversePath = "loose";
|
|
|
|
|
# enable = false;
|
|
|
|
|
# #allowedUDPPorts = [ 53 67 ];
|
|
|
|
|
# #allowedTCPPorts = [ 53 80 443 9443 ];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
|
|
|
}
|