From d3d1635a8b965a1f9b0d549324773a66367f8a55 Mon Sep 17 00:00:00 2001 From: Swarsel Date: Wed, 13 Dec 2023 13:46:40 +0100 Subject: [PATCH] threed hardware configuration --- Nix.org | 2 +- profiles/threed/hardware-configuration.nix | 39 ++++++++++++++++++++++ profiles/threed/home.nix | 5 +++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 profiles/threed/hardware-configuration.nix diff --git a/Nix.org b/Nix.org index 003725e..5a66da3 100644 --- a/Nix.org +++ b/Nix.org @@ -806,7 +806,7 @@ New setup for the SP3, this time using NixOS - another machine will take over th { - <> + <> home = { username = "swarsel"; diff --git a/profiles/threed/hardware-configuration.nix b/profiles/threed/hardware-configuration.nix new file mode 100644 index 0000000..b8040c1 --- /dev/null +++ b/profiles/threed/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" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/4a590cad-28d9-4153-bdb8-e424ec3bd5c8"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/C67D-61AD"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/b07aac27-a443-489c-9fdb-01c1ef633699"; } + ]; + + # 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.wlp1s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/profiles/threed/home.nix b/profiles/threed/home.nix index feb9d2b..b49d5a2 100644 --- a/profiles/threed/home.nix +++ b/profiles/threed/home.nix @@ -3,6 +3,11 @@ { + services.gpg-agent = { + enable = true; + enableSshSupport = true; + }; + home = { username = "swarsel";