diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..00b6580 --- /dev/null +++ b/default.nix @@ -0,0 +1,19 @@ +( + import + ( + let + lock = builtins.fromJSON (builtins.readFile ./flake.lock); + nodeName = lock.nodes.root.inputs.flake-compat; + in + fetchTarball { + url = + lock.nodes.${nodeName}.locked.url + or "https://github.com/edolstra/flake-compat/archive/${ + lock.nodes.${nodeName}.locked.rev + }.tar.gz"; + sha256 = lock.nodes.${nodeName}.locked.narHash; + } + ) + {src = ./.;} +) +.defaultNix diff --git a/flake.nix b/flake.nix index 3c7a05c..3407da6 100644 --- a/flake.nix +++ b/flake.nix @@ -1,9 +1,14 @@ { - description = "Description for the project"; + description = "A personal package overlay"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-parts.url = "github:hercules-ci/flake-parts"; + + flake-compat = { + url = "github:edolstra/flake-compat"; + flake = false; + }; }; outputs = inputs @ {flake-parts, ...}: @@ -11,8 +16,8 @@ systems = ["x86_64-linux" "aarch64-linux"]; imports = [./pkgs]; - perSystem = _: {}; - - flake = {}; + perSystem = {pkgs, ...}: { + formatter = pkgs.alejandra; + }; }; }