From caf359165640d0d8aef0ae938046699baceb3db4 Mon Sep 17 00:00:00 2001 From: Julien Malka Date: Mon, 1 Apr 2024 01:28:46 +0200 Subject: [PATCH] introduce patches --- default.nix | 6 ++++-- deps/sources.json | 13 +++++++++++++ lib/luj.nix | 2 +- patches/default.nix | 11 +++++++++++ 4 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 patches/default.nix diff --git a/default.nix b/default.nix index 310fe98..1dfe831 100644 --- a/default.nix +++ b/default.nix @@ -1,9 +1,11 @@ let inputs = import ./deps; + patch = import inputs.nix-patches { patchFile = ./patches; }; + inputs_final = inputs // { nixpkgs_patched = patch.mkNixpkgsSrc { src = inputs.unstable; version = "nixos-unstable"; }; }; nixpkgs = import inputs.nixpkgs { }; - lib = nixpkgs.lib.extend (import ./lib inputs); + lib = nixpkgs.lib.extend (import ./lib inputs_final); machines_plats = lib.lists.unique (lib.mapAttrsToList (_name: value: value.arch) (lib.filterAttrs (_n: v: builtins.hasAttr "arch" v) lib.luj.machines)); - mkMachine = import ./lib/mkmachine.nix inputs lib; + mkMachine = import ./lib/mkmachine.nix inputs_final lib; nixpkgs_plats = builtins.listToAttrs (builtins.map (plat: { diff --git a/deps/sources.json b/deps/sources.json index 31db301..7bf70d2 100644 --- a/deps/sources.json +++ b/deps/sources.json @@ -96,6 +96,19 @@ "url": "https://github.com/mic92/nix-index-database/archive/2844b5f3ad3b478468151bd101370b9d8ef8a3a7.tar.gz", "hash": "1kg8h513n2wk83bqh06pv73cvipfj171x5qqqzgv8kr5zimavx14" }, + "nix-patches": { + "type": "GitRelease", + "repository": { + "type": "Git", + "url": "https://git.hubrecht.ovh/hubrecht/nix-patches.git" + }, + "pre_releases": false, + "version_upper_bound": null, + "version": "v0.4.0", + "revision": "616b23a27a7ad72fcbde78962a9a96fba686f8b8", + "url": null, + "hash": "1msf33xs77h32fviziq949n57b3fckxwwmpjdpycp16lva36affm" + }, "nixos-mailserver": { "type": "Git", "repository": { diff --git a/lib/luj.nix b/lib/luj.nix index 6755435..9a17721 100644 --- a/lib/luj.nix +++ b/lib/luj.nix @@ -44,7 +44,7 @@ inputs: lib: with lib; let }; x2100 = { arch = "x86_64-linux"; - nixpkgs_version = inputs.unstable; + nixpkgs_version = inputs.nixpkgs_patched; hm_version = inputs.home-manager-unstable; }; fischer = { diff --git a/patches/default.nix b/patches/default.nix new file mode 100644 index 0000000..a830abf --- /dev/null +++ b/patches/default.nix @@ -0,0 +1,11 @@ +{ + "nixos-unstable" = [ + { + # nixos/bcachefs: support unlock with clevis in systemd stage 1 + id = "295736"; + hash = "sha256-JKuzNtI1X7sFT2raEC9UOf4feGdS8bg5uG2r8TMtFag="; + } + + ]; +} +