From f329f8b501d1064b20bef79016f767f3ce5b2d70 Mon Sep 17 00:00:00 2001 From: Joshua Yuen Date: Sat, 20 Jun 2026 21:22:41 -0400 Subject: [PATCH] Add laptop configuration --- flake.nix | 19 +++++++++++++++++++ hosts/laptop/default.nix | 15 +++++++++++++++ hosts/laptop/hardware.nix | 33 +++++++++++++++++++++++++++++++++ hosts/laptop/host-packages.nix | 9 +++++++++ 4 files changed, 76 insertions(+) create mode 100644 hosts/laptop/default.nix create mode 100644 hosts/laptop/hardware.nix create mode 100644 hosts/laptop/host-packages.nix diff --git a/flake.nix b/flake.nix index 5df9a63..6f08b6f 100644 --- a/flake.nix +++ b/flake.nix @@ -49,6 +49,25 @@ in { nixosConfigurations = { + laptop = let + host = "laptop"; + profile = "desktop"; + username = "josh"; + gpgSigningKey = "0x530DA0331EFE99F5"; + in nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { + inherit inputs; + inherit host; + inherit profile; + inherit username; + inherit gpgSigningKey; + }; + modules = [ + ./hosts/${host} + ]; + }; + vm = let host = "vm"; profile = "desktop"; diff --git a/hosts/laptop/default.nix b/hosts/laptop/default.nix new file mode 100644 index 0000000..c82a518 --- /dev/null +++ b/hosts/laptop/default.nix @@ -0,0 +1,15 @@ +{ + ... +}: +{ + imports = [ + ../../profiles/desktop + + ../../modules/core + ../../modules/drivers + ../../modules/options + + ./hardware.nix + ./host-packages.nix + ]; +} diff --git a/hosts/laptop/hardware.nix b/hosts/laptop/hardware.nix new file mode 100644 index 0000000..31204ca --- /dev/null +++ b/hosts/laptop/hardware.nix @@ -0,0 +1,33 @@ +# 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" "thunderbolt" "nvme" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/041a9bc5-aae2-44ec-bacf-7f6a08a696f9"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/79D1-97BE"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/82b669f5-d624-4a29-bf18-dd8bc453f537"; } + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/laptop/host-packages.nix b/hosts/laptop/host-packages.nix new file mode 100644 index 0000000..f7bbbf8 --- /dev/null +++ b/hosts/laptop/host-packages.nix @@ -0,0 +1,9 @@ +{ + pkgs, + ... +}: +{ + environment.systemPackages = with pkgs; [ + + ]; +}