From 7ef961bd93fdc17649cb5031b30567fdde5af29d Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Sat, 22 Mar 2025 19:12:32 -0400 Subject: [PATCH] server hardware-configuration.nix --- .../hardware-configuration.nix | 39 +++++++++++++++++++ clients/quadraticserver/ssh.nix | 2 +- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 clients/quadraticserver/hardware-configuration.nix diff --git a/clients/quadraticserver/hardware-configuration.nix b/clients/quadraticserver/hardware-configuration.nix new file mode 100644 index 0000000..a1be8bc --- /dev/null +++ b/clients/quadraticserver/hardware-configuration.nix @@ -0,0 +1,39 @@ +# 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 = [ "xhci_pci" "ahci" "ehci_pci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/f54eef44-4680-4537-9040-3a148ed61fab"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/ECDF-096A"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + # 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.enp1s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/clients/quadraticserver/ssh.nix b/clients/quadraticserver/ssh.nix index 22b0bad..5ea1d70 100644 --- a/clients/quadraticserver/ssh.nix +++ b/clients/quadraticserver/ssh.nix @@ -2,7 +2,7 @@ services.openssh = { enable = true; settings = { - PasswordAuthentication = true; + PasswordAuthentication = false; AllowUsers = ["quadradical"]; PermitRootLogin = "no"; };