diff --git a/README.md b/README.md index b764881..bfdaf09 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,6 @@ mostly wrappers that set common device tree settings for you. nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11"; raspberry-pi-nix = { url = "github:tstat/raspberry-pi-nix"; - inputs.nixpkgs.follows = "nixpkgs"; }; }; diff --git a/flake.nix b/flake.nix index 0e4fe7e..c4567b5 100644 --- a/flake.nix +++ b/flake.nix @@ -1,14 +1,11 @@ { description = "raspberry-pi nixos configuration"; - inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11"; }; + inputs = { }; - outputs = { self, nixpkgs }: { + outputs = { self }: { overlay = import ./overlay; - rpi = import ./rpi { - nixpkgs = nixpkgs; - overlay = self.overlay; - }; + rpi = import ./rpi { overlay = self.overlay; }; rpi-3b-plus = import ./rpi-3b-plus self.rpi; rpi-4b = import ./rpi-4b self.rpi; rpi-zero-2-w = import ./rpi-zero-2-w self.rpi; diff --git a/rpi/default.nix b/rpi/default.nix index 1df7e01..c2d0a24 100644 --- a/rpi/default.nix +++ b/rpi/default.nix @@ -1,9 +1,9 @@ -{ overlay, nixpkgs }: +{ overlay }: { lib, pkgs, config, ... }: { imports = [ - (import ../sd-image nixpkgs) + ../sd-image ./device-tree.nix ./audio.nix ./i2c.nix diff --git a/sd-image/default.nix b/sd-image/default.nix index 0977461..3ebb0da 100644 --- a/sd-image/default.nix +++ b/sd-image/default.nix @@ -1,8 +1,7 @@ -stable: { config, lib, pkgs, ... }: { - imports = [ (import ./sd-image.nix stable) ]; + imports = [ ./sd-image.nix ]; boot.loader.grub.enable = false; boot.loader.generic-extlinux-compatible.enable = true; diff --git a/sd-image/sd-image.nix b/sd-image/sd-image.nix index c3891cc..aeaa9e4 100644 --- a/sd-image/sd-image.nix +++ b/sd-image/sd-image.nix @@ -1,4 +1,3 @@ -nixpkgs: # This module was lifted from nixpkgs installer code. It is modified # so as to not import all-hardware. The goal here is to write the # nixos image for a raspberry pi to an sd-card in a way so that we can @@ -18,12 +17,12 @@ nixpkgs: # The derivation for the SD image will be placed in # config.system.build.sdImage -{ config, lib, pkgs, ... }: +{ modulesPath, config, lib, pkgs, ... }: with lib; let - rootfsImage = pkgs.callPackage "${nixpkgs}/nixos/lib/make-ext4-fs.nix" ({ + rootfsImage = pkgs.callPackage "${modulesPath}/../lib/make-ext4-fs.nix" ({ inherit (config.sdImage) storePaths; compressImage = true; populateImageCommands = config.sdImage.populateRootCommands;