From 3c5451d104e90cc762be226552a7d8fa0da9f6ef Mon Sep 17 00:00:00 2001 From: tdback Date: Fri, 17 Jan 2025 19:53:42 -0500 Subject: feat: add hardware.nix to loki config --- hosts/loki/default.nix | 2 ++ hosts/loki/hardware.nix | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 hosts/loki/hardware.nix (limited to 'hosts/loki') diff --git a/hosts/loki/default.nix b/hosts/loki/default.nix index dc461dc..5028d3c 100644 --- a/hosts/loki/default.nix +++ b/hosts/loki/default.nix @@ -2,6 +2,8 @@ { system.stateVersion = "24.11"; + imports = [ ./hardware.nix ]; + home-manager = { useGlobalPkgs = true; useUserPackages = true; diff --git a/hosts/loki/hardware.nix b/hosts/loki/hardware.nix new file mode 100644 index 0000000..15ed37d --- /dev/null +++ b/hosts/loki/hardware.nix @@ -0,0 +1,37 @@ +# 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 + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_scsi" "sr_mod" ]; + boot.initrd.kernelModules = [ "dm-snapshot" ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/a3a9fc5f-8809-4db0-b0f3-08e58cb79716"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/F4CB-1F7D"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + 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; + + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; +} -- cgit v1.2.3