From 586140ce4754e6c3e2ecd44710624c89f9ed1a03 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Fri, 3 Nov 2023 12:40:30 +0300 Subject: [PATCH] flake: add flake-compat --- default.nix | 19 +++++++++++++++++++ flake.nix | 13 +++++++++---- 2 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 default.nix 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; + }; }; }