From fec58e770d02c765a18d687e66361ec87233b49e Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 21 Sep 2024 09:58:08 +0100 Subject: [PATCH] Add nixos-hardware for system76 --- flake.lock | 17 +++++++++++++++++ flake.nix | 11 ++++++++++- lib/nixos/default.nix | 3 +++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index a2bcf20..d6e5330 100644 --- a/flake.lock +++ b/flake.lock @@ -39,6 +39,22 @@ "type": "github" } }, + "nixos-hardware": { + "locked": { + "lastModified": 1726724509, + "narHash": "sha256-sVeAM1tgVi52S1e29fFBTPUAFSzgQwgLon3CrztXGm8=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "10d5e0ecc32984c1bf1a9a46586be3451c42fd94", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1725407940, @@ -141,6 +157,7 @@ "root": { "inputs": { "home-manager": "home-manager", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable", "opdavies-nvim": "opdavies-nvim" diff --git a/flake.nix b/flake.nix index 1ba0dd3..a8fcaf9 100644 --- a/flake.nix +++ b/flake.nix @@ -3,6 +3,8 @@ home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.url = "github:nix-community/home-manager/release-24.05"; + nixos-hardware.url = "github:NixOS/nixos-hardware/master"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; @@ -13,7 +15,13 @@ }; outputs = - { nixpkgs, self, ... }@inputs: + { + home-manager, + nixos-hardware, + nixpkgs, + self, + ... + }@inputs: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; @@ -23,6 +31,7 @@ mkNixos = import ./lib/nixos { inherit inputs + nixos-hardware pkgs self username diff --git a/lib/nixos/default.nix b/lib/nixos/default.nix index aabd5a2..8874480 100644 --- a/lib/nixos/default.nix +++ b/lib/nixos/default.nix @@ -1,5 +1,6 @@ { inputs, + nixos-hardware, pkgs, self, username, @@ -51,5 +52,7 @@ inputs.nixpkgs.lib.nixosSystem { configuration hardwareConfiguration + + nixos-hardware.nixosModules.system76 ]; }