From e38180a5f08066be9cd81f4b86bb9d1fd865d0d5 Mon Sep 17 00:00:00 2001 From: clerie Date: Thu, 23 Mar 2023 17:09:54 +0100 Subject: [PATCH] Specific nixpkgs per host --- flake.lock | 17 +++++++++++++++++ flake.nix | 1 + lib/flake-helper.nix | 4 +++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index 4a55b82..2cff4bb 100644 --- a/flake.lock +++ b/flake.lock @@ -36,10 +36,27 @@ "type": "github" } }, + "nixpkgs-schule": { + "locked": { + "lastModified": 1679437018, + "narHash": "sha256-vOuiDPLHSEo/7NkiWtxpHpHgoXoNmrm+wkXZ6a072Fc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "19cf008bb18e47b6e3b4e16e32a9a4bdd4b45f7e", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "nixos-exporter": "nixos-exporter", "nixpkgs": "nixpkgs", + "nixpkgs-schule": "nixpkgs-schule", "solid-xmpp-alarm": "solid-xmpp-alarm" } }, diff --git a/flake.nix b/flake.nix index 83e71d2..d3bffa8 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,7 @@ { inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs-schule.url = "github:NixOS/nixpkgs/nixos-unstable"; nixos-exporter = { url = "git+https://git.clerie.de/clerie/nixos-exporter.git"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/lib/flake-helper.nix b/lib/flake-helper.nix index 352ca51..1e3acaa 100644 --- a/lib/flake-helper.nix +++ b/lib/flake-helper.nix @@ -1,7 +1,9 @@ { self, nixpkgs, nixos-exporter, solid-xmpp-alarm, ... }@inputs: rec { - generateNixosSystem = name: nixpkgs.lib.nixosSystem { + generateNixosSystem = name: let + localNixpkgs = nixpkgs.lib.attrByPath [ "nixpkgs-${name}" ] nixpkgs inputs; + in localNixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ ({ ... }: {