summaryrefslogtreecommitdiff
path: root/machines/kusanagi/hardware-configuration.nix
diff options
context:
space:
mode:
authorHenry J. Webster <hwebs@hwebs.info>2026-07-30 10:38:54 -0500
committerHenry J. Webster <hwebs@hwebs.info>2026-07-30 10:38:54 -0500
commit11ba75e40728e8b5735c9c7cefc7af1631c942af (patch)
treecaef581fd56be96ec9c5338a17d0332b51b08e64 /machines/kusanagi/hardware-configuration.nix
parentd47d76336a9680b661220d23c5d429d90a2f3f9e (diff)
Restructure into a multi-machine flake and add the enzo laptop
Split the single-host config into a shared minimal base plus opt-in profiles, and add a second machine (enzo laptop) alongside kusanagi. - flake: add mkMachine helper; declare nixosConfigurations.kusanagi and .enzo; add the disko input; move overlays per-machine. - common/: minimal base only (boot, networking, tailscale, locale, nix settings, neovim editor). Old configuration.nix/programs.nix removed. - profiles/: coarse opt-in bundles (desktop, dev, apps). kusanagi imports all three and stays byte-for-byte identical to the running system. - machines/kusanagi/: all workstation-only config (ROCm, Scarlett audio, optical-disc archiving, NAS mounts, kavita/immich/ollama); hardware config moved here unchanged. User stays 'henz'. - machines/enzo/: new laptop. Declarative LUKS+btrfs via disko (LVM-on-LUKS, TPM2+PIN unlock, zram + encrypted swap for suspend-then-hibernate); its own minimal niri desktop with playback-only audio (no rtkit/jack); user 'hwebs'. Assisted-by: Claude:claude-opus-4-8
Diffstat (limited to 'machines/kusanagi/hardware-configuration.nix')
-rw-r--r--machines/kusanagi/hardware-configuration.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/machines/kusanagi/hardware-configuration.nix b/machines/kusanagi/hardware-configuration.nix
new file mode 100644
index 0000000..9c601e9
--- /dev/null
+++ b/machines/kusanagi/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 = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ "kvm-amd" ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/ad74db0c-c909-4503-84f6-cc08ca0b1e4b";
+ fsType = "ext4";
+ };
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/9499-40FE";
+ 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.<interface>.useDHCP`.
+ networking.useDHCP = lib.mkDefault true;
+ # networking.interfaces.enp9s0.useDHCP = lib.mkDefault true;
+ # networking.interfaces.wlp8s0.useDHCP = lib.mkDefault true;
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}