Skip to content

Commit

Permalink
rp3: Use the nixos-hardware configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
wagdav committed Jul 28, 2024
1 parent 558b5ce commit a9ecd6f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -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" ''
Expand Down
12 changes: 0 additions & 12 deletions hardware/rp3.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -26,10 +18,6 @@ in

hardware.enableRedistributableFirmware = true;

environment.systemPackages = with pkgs; [
libraspberrypi
];

services.journald.extraConfig = ''
Storage = volatile
RuntimeMaxFileSize = 10M
Expand Down
3 changes: 2 additions & 1 deletion host-rp3.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{ config, ... }:
{ config, nixos-hardware, ... }:

{
imports = [
nixos-hardware.nixosModules.raspberry-pi-3
./hardware/rp3.nix
./modules/camera.nix
./modules/common.nix
Expand Down

0 comments on commit a9ecd6f

Please sign in to comment.