summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCrazazy2022-01-31 13:01:18 +0100
committerCrazazy2022-02-10 16:13:34 +0100
commit7f4ed33bc6de8c9cebebab7b33c9dc3da671dbd9 (patch)
tree4173922b9c730d7d918a2d7942bdf78275124360
parent7dd382cbb5f90d30cf145c50ffa3866ead804ea5 (diff)
add hardware config
This can be pretty handy if I decide to nuke some auto-generated files
-rw-r--r--.gitignore1
-rw-r--r--hardware-configuration.nix64
2 files changed, 65 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 510c462..23f8c6d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
*
!.gitignore
!*.org
+!hardware-configuration.nix
diff --git a/hardware-configuration.nix b/hardware-configuration.nix
new file mode 100644
index 0000000..8724157
--- /dev/null
+++ b/hardware-configuration.nix
@@ -0,0 +1,64 @@
+# 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, ... }:
+
+{
+ imports =
+ [
+ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
+ ];
+
+ boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ "kvm-intel" ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ {
+ device = "none";
+ fsType = "tmpfs";
+ };
+
+ fileSystems."/nix" =
+ {
+ device = "/dev/disk/by-uuid/d93af828-9b06-426a-9247-8b853309d880";
+ fsType = "ext4";
+ };
+
+ fileSystems."/boot" =
+ {
+ device = "/dev/disk/by-uuid/A617-19CF";
+ fsType = "vfat";
+ };
+
+ fileSystems."/etc/nixos" =
+ {
+ device = "/nix/persist/etc/nixos";
+ fsType = "none";
+ options = [ "bind" ];
+ };
+
+ fileSystems."/var/log" =
+ {
+ device = "/nix/persist/var/log";
+ fsType = "none";
+ options = [ "bind" ];
+ };
+
+ fileSystems."/etc/NetworkManager" =
+ {
+ device = "/nix/persist/etc/NetworkManager";
+ fsType = "none";
+ options = [ "bind" ];
+ };
+
+ swapDevices = [
+ {
+ label = "swap";
+ }
+ ];
+
+ nix.maxJobs = lib.mkDefault 8;
+ powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
+}