diff --git a/flake.lock b/flake.lock index 40308bd..b37a139 100644 --- a/flake.lock +++ b/flake.lock @@ -221,6 +221,22 @@ "type": "github" } }, + "nixos-hardware": { + "locked": { + "lastModified": 1716173274, + "narHash": "sha256-FC21Bn4m6ctajMjiUof30awPBH/7WjD0M5yqrWepZbY=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "d9e0b26202fd500cf3e79f73653cce7f7d541191", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1687274257, @@ -351,6 +367,7 @@ "nix-darwin": "nix-darwin", "nix-flatpak": "nix-flatpak", "nix-homebrew": "nix-homebrew", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_3", "nixpkgs-terraform": "nixpkgs-terraform", "nixpkgs-unstable": "nixpkgs-unstable", diff --git a/flake.nix b/flake.nix index 8d00969..f04aeef 100644 --- a/flake.nix +++ b/flake.nix @@ -47,6 +47,8 @@ inputs.nixpkgs-unstable.follows = "nixpkgs-unstable"; }; + nixos-hardware.url = "github:NixOS/nixos-hardware/master"; + # Secrets managemnt sops-nix = { url = "github:mic92/sops-nix"; @@ -56,7 +58,7 @@ }; # end inputs outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, compose2nix, disko, genebean-omp-themes, - home-manager, nix-darwin, nix-flatpak, nix-homebrew, nixpkgs-terraform, sops-nix, ... }: let + home-manager, nix-darwin, nix-flatpak, nix-homebrew, nixpkgs-terraform, nixos-hardware, sops-nix, ... }: let # creates a macOS system config darwinHostConfig = system: hostname: username: nix-darwin.lib.darwinSystem { @@ -126,6 +128,7 @@ sops-nix.nixosModules.sops # system wide secrets management ./modules/system/common/all-nixos.nix # system-wide stuff ./modules/hosts/nixos/${hostname} # host specific stuff + nixos-hardware.nixosModules.lenovo-thinkpad-p52 ]; }; # end nixosSystem diff --git a/modules/hosts/nixos/bigboy/default.nix b/modules/hosts/nixos/bigboy/default.nix index 4608070..51e440b 100644 --- a/modules/hosts/nixos/bigboy/default.nix +++ b/modules/hosts/nixos/bigboy/default.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, username, ... }: +{ pkgs, username, ... }: { imports = diff --git a/modules/hosts/nixos/bigboy/hardware-configuration.nix b/modules/hosts/nixos/bigboy/hardware-configuration.nix index d551d88..f74f6be 100644 --- a/modules/hosts/nixos/bigboy/hardware-configuration.nix +++ b/modules/hosts/nixos/bigboy/hardware-configuration.nix @@ -1,7 +1,7 @@ # 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, ... }: +{ config, lib, modulesPath, ... }: { imports = @@ -37,7 +37,10 @@ # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.bluetooth.enable = true; hardware.bluetooth.powerOnBoot = true; + + # Enable the Nvidia settings menu, + # accessible via `nvidia-settings`. + hardware.nvidia.nvidiaSettings = true; } diff --git a/modules/system/common/all-nixos.nix b/modules/system/common/all-nixos.nix index 4e9bed4..d1d7839 100644 --- a/modules/system/common/all-nixos.nix +++ b/modules/system/common/all-nixos.nix @@ -13,6 +13,7 @@ inetutils iotop neofetch + pciutils python3 sops ssh-to-age