enhancement: remove impure <nixpkgs>

Co-Authored-By: Jamie Magee <jamie.magee@gmail.com>
Co-Authored-By: Doron Behar <doron.behar@gmail.com>
This commit is contained in:
Malix - Alix Brunet 2026-01-09 19:19:32 +01:00 committed by Doron Behar
parent f1b7ff92cd
commit d84f0810be
4 changed files with 35 additions and 17 deletions

19
flake.lock generated
View file

@ -1,6 +1,23 @@
{
"nodes": {
"root": {}
"nixpkgs": {
"locked": {
"lastModified": 1767892417,
"narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=",
"rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba",
"type": "tarball",
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre924538.3497aa5c9457/nixexprs.tar.xz"
},
"original": {
"type": "tarball",
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7

View file

@ -1,13 +1,17 @@
{
description = "nixos-hardware";
inputs.nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz";
outputs =
{ self, ... }:
{ self, nixpkgs, ... }:
let
# Import private inputs (for development)
privateInputs =
(import ./tests/flake-compat.nix {
src = ./tests;
src = {
outPath = self.outPath + "/tests";
};
}).defaultNix;
systems = [
@ -23,17 +27,10 @@
];
# Helper to iterate over systems
eachSystem =
f:
privateInputs.nixos-unstable-small.lib.genAttrs systems (
system: f privateInputs.nixos-unstable-small.legacyPackages.${system} system
);
eachSystem = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system} system);
eachSystemFormat =
f:
privateInputs.nixos-unstable-small.lib.genAttrs formatSystems (
system: f privateInputs.nixos-unstable-small.legacyPackages.${system} system
);
f: nixpkgs.lib.genAttrs formatSystems (system: f nixpkgs.legacyPackages.${system} system);
in
{
@ -494,6 +491,8 @@
run-tests = pkgs.callPackage ./tests/run-tests.nix {
inherit self;
};
mnt-reform-kernel-patches = pkgs.callPackage ./mnt/reform/updateKernelPatches.nix { };
}
// pkgs.lib.optionalAttrs (system == "aarch64-linux") {
# Boot images for NXP i.MX boards (aarch64-linux only)

View file

@ -1,9 +1,11 @@
{
lib,
fetchFromGitLab,
}:
let
nixpkgs = import <nixpkgs> { };
pkgs = nixpkgs.pkgs;
lib = nixpkgs.lib;
sources = lib.importJSON ./sources.json;
reformDebianPackages = pkgs.fetchFromGitLab sources.reformDebianPackages;
reformDebianPackages = fetchFromGitLab sources.reformDebianPackages;
in
map (lib.removePrefix "${reformDebianPackages}/") (
lib.filesystem.listFilesRecursive "${reformDebianPackages}/linux/patches${lib.versions.majorMinor sources.modDirVersion}"

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
nix eval --file updateKernelPatches.nix > kernelPatches.nix
nix eval .#mnt-reform-kernel-patches > kernelPatches.nix
nix fmt kernelPatches.nix