From 8023a45e00f00d220d18a96b8f694958a0b4c89d Mon Sep 17 00:00:00 2001 From: twoneis Date: Sun, 11 Feb 2024 02:57:29 +0100 Subject: [PATCH] added config from zotac-mini --- devices/zotac-mini/default.nix | 17 +++++++++++ devices/zotac-mini/hardware-config.nix | 41 ++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 devices/zotac-mini/default.nix create mode 100644 devices/zotac-mini/hardware-config.nix diff --git a/devices/zotac-mini/default.nix b/devices/zotac-mini/default.nix new file mode 100644 index 0000000..8071d17 --- /dev/null +++ b/devices/zotac-mini/default.nix @@ -0,0 +1,17 @@ +{ pkgs, ... }: { + imports = [ + ./hardware-config.nix + ]; + + boot.kernelPackages = pkgs.linuxPackages_zen; + + networking.hostName = "zotac-mini"; + + boot.loader = { + systemd-boot = { + enable = true; + }; + }; + + system.stateVersion = "24.05"; +} diff --git a/devices/zotac-mini/hardware-config.nix b/devices/zotac-mini/hardware-config.nix new file mode 100644 index 0000000..8d28861 --- /dev/null +++ b/devices/zotac-mini/hardware-config.nix @@ -0,0 +1,41 @@ +# 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 = [ "ahci" "xhci_pci" "usbhid" "usb_storage" "ums_realtek" "sd_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/4a496297-dd6f-42d8-9e1f-56149a0166ea"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/D976-03E3"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/3a785c6a-7f59-4647-9a84-f2e65d03997b"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp2s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp3s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}