From 739de7a8fa0ca6c990fd9e7608f69c809cd6f352 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 23 Mar 2022 20:45:38 +0100 Subject: ... --- flake.lock | 20 +++++++++++++++++++- flake.nix | 10 +++++++--- system-profiles/core.nix | 13 ++++++++++++- 3 files changed, 38 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index 15e8a7b7..7bdd2a6b 100644 --- a/flake.lock +++ b/flake.lock @@ -40,6 +40,23 @@ } }, "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1641205782, + "narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7", + "type": "github" + }, + "original": { + "owner": "edolstra", + "ref": "master", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_3": { "flake": false, "locked": { "lastModified": 1627913399, @@ -109,7 +126,7 @@ }, "nvfetcher": { "inputs": { - "flake-compat": "flake-compat_2", + "flake-compat": "flake-compat_3", "flake-utils": "flake-utils", "nixpkgs": [ "nixpkgs" @@ -133,6 +150,7 @@ "root": { "inputs": { "deploy-rs": "deploy-rs", + "flake-compat": "flake-compat_2", "home-manager": "home-manager", "nixpkgs": "nixpkgs", "nvfetcher": "nvfetcher", diff --git a/flake.nix b/flake.nix index a218d2fe..bf412444 100644 --- a/flake.nix +++ b/flake.nix @@ -36,6 +36,13 @@ ref = "master"; inputs.nixpkgs.follows = "nixpkgs"; }; + flake-compat = { + type = "github"; + owner = "edolstra"; + repo = "flake-compat"; + ref = "master"; + flake = false; + }; }; outputs = { self, nixpkgs, home-manager, sops-nix, deploy-rs, nvfetcher, ... }@inputs: @@ -166,9 +173,6 @@ homeConfigurations = listToAttrs (concatLists (mapAttrsToList (hostname: nixosConfig: mapAttrsToList (username: configuration: nameValuePair "${username}@${hostname}" { inherit (configuration.home) activationPackage; }) nixosConfig.config.home-manager.users) self.nixosConfigurations)); overlays = mapAttrs (_name: path: mkOverlay path) overlayPaths; - overlays-path = forAllSystems (system: systemPkgs: systemPkgs.writeText "overlays.nix" '' - map import (builtins.attrValues (builtins.fromJSON ${escapeNixString (toJSON overlayPaths)})) - ''); packages = mapAttrs (_name: filterAttrs (_name: isDerivation)) packages; packages' = mapAttrs (_name: filterAttrs (_name: value: !(isDerivation value))) packages; diff --git a/system-profiles/core.nix b/system-profiles/core.nix index 92e068b4..8c4325e2 100644 --- a/system-profiles/core.nix +++ b/system-profiles/core.nix @@ -53,7 +53,18 @@ in { ''; nixPath = [ "nixpkgs=${flakeInputs.nixpkgs.legacyPackages.${config.nixpkgs.system}.path}" - # "nixpkgs-overlays=${flake.overlays-path.${config.nixpkgs.system}}" + "nixpkgs-overlays=${pkgs.writeText "overlays.nix" '' + attrValues (import + ( + let lock = builtins.fromJSON (builtins.readFile ${toString ../flake.lock}); in + fetchTarball { + url = "https://github.com/edolstra/flake-compat/archive/''${lock.nodes.flake-compat.locked.rev}.tar.gz"; + sha256 = lock.nodes.flake-compat.locked.narHash; + } + ) + { src = ${toString ../.}; } + ).defaultNix.overlays + ''}" ]; registry = let override = { self = "nixos"; }; -- cgit v1.2.3