enable rpi4 hardware

This commit is contained in:
Sean Buckley 2022-01-02 16:37:05 -05:00
parent af509d8484
commit 03a4d4f4b8
4 changed files with 25 additions and 2 deletions

View file

@ -1,5 +1,20 @@
{ {
"nodes": { "nodes": {
"nixos-hardware": {
"locked": {
"lastModified": 1640686209,
"narHash": "sha256-6glXUlKRDhEhNuYx6r3fXU6KH2/Vq9mJZjB9oUpwrmc=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "46df95ca81e7e4cf3458cdb4b7d1714b5fce9da5",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1640798027, "lastModified": 1640798027,
@ -17,6 +32,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
} }

View file

@ -1,12 +1,16 @@
{ {
inputs.nixpkgs.url = "nixpkgs/nixos-21.11"; inputs.nixpkgs.url = "nixpkgs/nixos-21.11";
inputs.nixos-hardware.url = "github:NixOS/nixos-hardware";
outputs = { self, nixpkgs, ... }: outputs = { self, nixpkgs, nixos-hardware, ... }:
let let
mypkgs = import ./pkgs; mypkgs = import ./pkgs;
deploy = import lib/deploy.nix; deploy = import lib/deploy.nix;
hardware = import lib/hardware.nix "${nixpkgs}/nixos/modules";
hardware =
nixos-hardware.nixosModules //
import lib/hardware.nix "${nixpkgs}/nixos/modules";
forAllSystems = f: builtins.listToAttrs (map forAllSystems = f: builtins.listToAttrs (map
(name: { inherit name; value = f name; }) (name: { inherit name; value = f name; })

View file

@ -95,6 +95,7 @@ in
{ meta.nixpkgs = nixpkgs.legacyPackages.${system}; } // { meta.nixpkgs = nixpkgs.legacyPackages.${system}; } //
builtins.mapAttrs builtins.mapAttrs
(name: value: { (name: value: {
nixpkgs.system = value.config.nixpkgs.system; # needed for multi-arch deployments
imports = value.extraArgs.modules ++ [ imports = value.extraArgs.modules ++ [
({ config, ... }: { inherit (config.sconfig) deployment; }) ({ config, ... }: { inherit (config.sconfig) deployment; })
]; ];

View file

@ -106,6 +106,8 @@ with lib;
boot.kernelPackages = pkgs.linuxPackages_5_15; boot.kernelPackages = pkgs.linuxPackages_5_15;
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
boot.loader.timeout = boot.loader.timeout =
if config.boot.loader.systemd-boot.enable if config.boot.loader.systemd-boot.enable
then null else lib.mkOverride 9999 99; then null else lib.mkOverride 9999 99;