mirror of
https://github.com/nix-community/raspberry-pi-nix.git
synced 2025-11-08 19:46:03 +01:00
use modulesPath
This commit is contained in:
parent
c82e21e828
commit
b6066e9ccd
5 changed files with 8 additions and 14 deletions
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
{ overlay, nixpkgs }:
|
||||
{ overlay }:
|
||||
{ lib, pkgs, config, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(import ../sd-image nixpkgs)
|
||||
../sd-image
|
||||
./device-tree.nix
|
||||
./audio.nix
|
||||
./i2c.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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue