diff --git a/flake.nix b/flake.nix index 8b972ef..6009305 100644 --- a/flake.nix +++ b/flake.nix @@ -8,7 +8,7 @@ inputs.cachix-deploy.url = "github:cachix/cachix-deploy-flake"; inputs.nixos-generators.url = "github:nix-community/nixos-generators"; - outputs = { self, flake-compat, nixpkgs, nixos-generators, nixos-hardware, cachix-deploy }: + outputs = { self, flake-compat, nixpkgs, nixos-generators, nixos-hardware, cachix-deploy }@attrs: let system = "x86_64-linux"; @@ -25,6 +25,7 @@ mkMachine = system: modules: nixpkgs.lib.nixosSystem { inherit system; modules = modules ++ [ defaults ]; + specialArgs = attrs; }; mqtt-dash-listen = pkgs.writeScriptBin "mqtt-dash-listen" '' diff --git a/hardware/rp3.nix b/hardware/rp3.nix index 7cafe92..faaa415 100644 --- a/hardware/rp3.nix +++ b/hardware/rp3.nix @@ -9,14 +9,6 @@ in nix.settings.max-jobs = lib.mkDefault 4; nixpkgs.system = "aarch64-linux"; - boot = { - kernelModules = [ "bcm2835-v4l2" ]; - loader = { - grub.enable = false; - generic-extlinux-compatible.enable = true; - }; - }; - networking.wireless = { enable = true; environmentFile = "/etc/secrets/wireless.env"; @@ -26,10 +18,6 @@ in hardware.enableRedistributableFirmware = true; - environment.systemPackages = with pkgs; [ - libraspberrypi - ]; - services.journald.extraConfig = '' Storage = volatile RuntimeMaxFileSize = 10M diff --git a/host-rp3.nix b/host-rp3.nix index f406126..cabc2ac 100644 --- a/host-rp3.nix +++ b/host-rp3.nix @@ -1,7 +1,8 @@ -{ config, ... }: +{ config, nixos-hardware, ... }: { imports = [ + nixos-hardware.nixosModules.raspberry-pi-3 ./hardware/rp3.nix ./modules/camera.nix ./modules/common.nix