commit 04845a931aa79692c4ecc08e2c79309b8062473b
parent fde18e69487b00964735120e192461ce8dc7f462
Author: MTRNord <mtrnord1@gmail.com>
Date: Wed, 9 Aug 2023 11:49:40 +0200
Setup the hardware config
Diffstat:
1 file changed, 65 insertions(+), 9 deletions(-)
diff --git a/nixos/worker-1/hardware-configuration.nix b/nixos/worker-1/hardware-configuration.nix
@@ -1,10 +1,65 @@
-# This is just an example, you should generate yours with nixos-generate-config and put it in here.
+# 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, ... }:
+
{
- fileSystems."/" = {
- device = "/dev/sda1";
- fsType = "ext4";
- };
-
- # Set your system kind (needed for flakes)
- nixpkgs.hostPlatform = "aarch64-linux";
-}
+ imports =
+ [ (modulesPath + "/profiles/qemu-guest.nix")
+ ];
+
+ boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "virtio_scsi" "usbhid" "sr_mod" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/0bfb59e2-0156-4845-8887-043976a17dca";
+ fsType = "btrfs";
+ options = [ "subvol=root" "compress=zstd" "noatime" ];
+ };
+
+ boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/7116e0c2-b7f5-4960-a283-b4a958213bcd";
+
+ fileSystems."/home" =
+ { device = "/dev/disk/by-uuid/0bfb59e2-0156-4845-8887-043976a17dca";
+ fsType = "btrfs";
+ options = [ "subvol=home" "compress=zstd" "noatime" ];
+ };
+
+ fileSystems."/nix" =
+ { device = "/dev/disk/by-uuid/0bfb59e2-0156-4845-8887-043976a17dca";
+ fsType = "btrfs";
+ options = [ "subvol=nix" "compress=zstd" "noatime" ];
+ };
+
+ fileSystems."/persist" =
+ { device = "/dev/disk/by-uuid/0bfb59e2-0156-4845-8887-043976a17dca";
+ fsType = "btrfs";
+ options = [ "subvol=persist" "compress=zstd" "noatime" ];
+ };
+
+ fileSystems."/var/log" =
+ { device = "/dev/disk/by-uuid/0bfb59e2-0156-4845-8887-043976a17dca";
+ fsType = "btrfs";
+ options = [ "subvol=log" "compress=zstd" "noatime" ];
+ neededForBoot = true;
+ };
+
+ fileSystems."/boot" =
+ { device = "/dev/sda1";
+ fsType = "vfat";
+ };
+
+ 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.<interface>.useDHCP`.
+ networking.useDHCP = lib.mkDefault true;
+ # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
+ # networking.interfaces.enp7s0.useDHCP = lib.mkDefault true;
+
+ nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
+}
+\ No newline at end of file