From d2b5d0a958147d5323cc44744701838c6b83ac59 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Sat, 9 Mar 2024 01:48:11 +0100 Subject: [PATCH] feat: introduce our own flake-compat Signed-off-by: Raito Bezarius --- default.nix | 10 ++++++++++ flake.lock | 16 ++++++++++++++++ flake.nix | 3 ++- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 default.nix diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..b25de19 --- /dev/null +++ b/default.nix @@ -0,0 +1,10 @@ +(import + ( + let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in + fetchTarball { + url = lock.nodes.flake-compat.locked.url or "https://git.lix.systems/lix-project/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; + sha256 = lock.nodes.flake-compat.locked.narHash; + } + ) + { src = ./.; } +).defaultNix diff --git a/flake.lock b/flake.lock index 7d21988..3a08349 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,20 @@ { "nodes": { + "flake-compat": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "ref": "refs/heads/master", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "git", + "url": "ssh://git@git.lix.systems/lix-project/flake-compat" + }, + "original": { + "type": "git", + "url": "ssh://git@git.lix.systems/lix-project/flake-compat" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -52,6 +67,7 @@ }, "root": { "inputs": { + "flake-compat": "flake-compat", "flake-utils": "flake-utils", "lix": "lix", "nixpkgs": "nixpkgs" diff --git a/flake.nix b/flake.nix index d241f95..742d9a8 100644 --- a/flake.nix +++ b/flake.nix @@ -6,8 +6,9 @@ flake = false; }; inputs.flake-utils.url = "github:numtide/flake-utils"; + inputs.flake-compat.url = "git+ssh://git@git.lix.systems/lix-project/flake-compat"; - outputs = { self, nixpkgs, lix, flake-utils }: { + outputs = { self, nixpkgs, lix, flake-utils, ... }: { nixosModules.default = import ./module.nix { inherit lix; }; overlays.default = import ./overlay.nix { inherit lix; }; } // flake-utils.lib.eachDefaultSystem (system: