From 0d1276915ca8cdd9b1b65f8c11832d0d598c49af Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Fri, 29 Sep 2023 20:41:27 -0400 Subject: really add laptop host --- hosts/default.nix | 20 +++++++++++++++++++- hosts/jontop/hardware.nix | 7 +++++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/hosts/default.nix b/hosts/default.nix index a5aace9..862cccf 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -1,4 +1,4 @@ -{ inputs, lib, nixpkgs, nixpkgs-unstable, nurpkgs, home-manager, stateVersion }: +{ inputs, lib, nixpkgs, nixpkgs-unstable, nurpkgs, nixos-hardware, home-manager, stateVersion }: let system = "x86_64-linux"; pkgs = import nixpkgs { @@ -29,4 +29,22 @@ in } ]; }; + + jontop = lib.nixosSystem { + inherit system; + specialArgs = { + inherit inputs system pkgs-unstable nurpkgs nixos-hardware stateVersion; + user = "jon"; + }; + modules = [ + { nixpkgs.overlays = [ nurpkgs.overlay ]; } + ./config.nix + ./jontop + + home-manager.nixosModules.home-manager { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + } + ]; + }; } diff --git a/hosts/jontop/hardware.nix b/hosts/jontop/hardware.nix index 7d3f7c9..dc5af7e 100644 --- a/hosts/jontop/hardware.nix +++ b/hosts/jontop/hardware.nix @@ -1,7 +1,10 @@ -{ ... }: +{ config, lib, pkgs, nixos-hardware, modulesPath, ... }: { imports = - [ (modulesPath + "/installer/scan/not-detected.nix") ]; + [ + (modulesPath + "/installer/scan/not-detected.nix") + nixos-hardware.nixosModules.lenovo-thinkpad-x220 + ]; boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ]; boot.initrd.kernelModules = [ "i915" ]; -- cgit v1.2.1