diff --git a/default.nix b/default.nix new file mode 100644 index 00000000..6969a659 --- /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; + sha256 = lock.nodes.flake-compat.locked.narHash; + } + ) + { src = ./.; } +).defaultNix diff --git a/flake.lock b/flake.lock index ec6aadca..15508a8c 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,18 @@ { "nodes": { + "flake-compat": { + "locked": { + "lastModified": 1714705744, + "narHash": "sha256-SsaS620K6QZVCOUqcWU/sHEkipnsJcqslfrU9oko+f4=", + "rev": "5adafc5bfbb5b1df965df8ade18b1b0ce00a418e", + "type": "tarball", + "url": "https://git.lix.systems/api/v1/repos/lix-project/flake-compat/archive/5adafc5bfbb5b1df965df8ade18b1b0ce00a418e.tar.gz?rev=5adafc5bfbb5b1df965df8ade18b1b0ce00a418e" + }, + "original": { + "type": "tarball", + "url": "https://git.lix.systems/api/v1/repos/lix-project/flake-compat/archive/main.tar.gz" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -36,6 +49,7 @@ }, "root": { "inputs": { + "flake-compat": "flake-compat", "flake-utils": "flake-utils", "nixpkgs": "nixpkgs", "spectrum": "spectrum" diff --git a/flake.nix b/flake.nix index 6741cb09..6121c8ca 100644 --- a/flake.nix +++ b/flake.nix @@ -9,13 +9,14 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; + flake-compat.url = "https://git.lix.systems/api/v1/repos/lix-project/flake-compat/archive/main.tar.gz"; spectrum = { url = "git+https://spectrum-os.org/git/spectrum"; flake = false; }; }; - outputs = { self, nixpkgs, flake-utils, spectrum }: + outputs = { self, nixpkgs, flake-utils, spectrum, flake-compat }: let systems = [ "x86_64-linux" diff --git a/shell.nix b/shell.nix new file mode 100644 index 00000000..1c485cec --- /dev/null +++ b/shell.nix @@ -0,0 +1,10 @@ +(import + ( + let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in + fetchTarball { + url = lock.nodes.flake-compat.locked.url; + sha256 = lock.nodes.flake-compat.locked.narHash; + } + ) + { src = ./.; } +).shellNix