From 462538a5c6541c8dd588e69aae0537d05d3fc8ba Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Mon, 7 Apr 2025 22:06:48 -0400 Subject: [PATCH] added minipc3 --- hosts/hl-minipc3.hardware-configuration.nix | 31 +++++++++++++++++++++ hosts/hl-minipc3.nix | 19 +++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 hosts/hl-minipc3.hardware-configuration.nix create mode 100644 hosts/hl-minipc3.nix diff --git a/hosts/hl-minipc3.hardware-configuration.nix b/hosts/hl-minipc3.hardware-configuration.nix new file mode 100644 index 0000000..4cb8e10 --- /dev/null +++ b/hosts/hl-minipc3.hardware-configuration.nix @@ -0,0 +1,31 @@ +{ config, lib, modulesPath, ... }: +{ + imports = + [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { + device = "/dev/disk/by-uuid/5a468faa-b149-4ae2-9106-f0b5216d6d95"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { + device = "/dev/disk/by-uuid/6CC4-8800"; + fsType = "vfat"; + }; + + swapDevices = + [{ device = "/dev/disk/by-uuid/e847bdf2-e049-428b-a203-8a1eae77ce56"; }]; + + networking.useDHCP = lib.mkDefault true; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/hl-minipc3.nix b/hosts/hl-minipc3.nix new file mode 100644 index 0000000..9e9afad --- /dev/null +++ b/hosts/hl-minipc3.nix @@ -0,0 +1,19 @@ +{ user }: +{ pkgs +, ... +}: +{ + imports = [ ./hl-minipc3.hardware-configuration.nix ]; + skyg.user.enable = true; + skyg.nixos.common.ssh-server.enable = true; + skyg.nixos.common.containers.openMetricsPort = true; + skyg.server.exporters.enable = true; + # firmware updater + services.fwupd.enable = true; + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + # Disable firewall + networking.firewall.enable = false; +} +