From b0a84f4ccab917236a836a03758c50c932d121e5 Mon Sep 17 00:00:00 2001 From: surtur Date: Sat, 10 Sep 2022 22:00:01 +0200 Subject: [PATCH] nix(flake): add flake-compat for legacy nix --- default.nix | 12 ++++++++++++ flake.lock | 17 +++++++++++++++++ flake.nix | 4 ++++ shell.nix | 12 ++++++++++++ 4 files changed, 45 insertions(+) create mode 100644 default.nix create mode 100644 shell.nix diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..11f26c6 --- /dev/null +++ b/default.nix @@ -0,0 +1,12 @@ +(import ( + let + lock = builtins.fromJSON (builtins.readFile ./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 = ./.; + }) +.defaultNix diff --git a/flake.lock b/flake.lock index 3439121..a93ff19 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1650374568, + "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "b4a34015c698c7793d592d66adbab377907a2be8", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -59,6 +75,7 @@ }, "root": { "inputs": { + "flake-compat": "flake-compat", "home-manager": "home-manager", "homeage": "homeage", "nixpkgs": "nixpkgs" diff --git a/flake.nix b/flake.nix index 55c04ba..5bbc6a4 100644 --- a/flake.nix +++ b/flake.nix @@ -8,6 +8,10 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + flake-compat = { + url = "github:edolstra/flake-compat"; + flake = false; + }; homeage = { url = "github:jordanisaacs/homeage"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..814c03b --- /dev/null +++ b/shell.nix @@ -0,0 +1,12 @@ +(import ( + let + lock = builtins.fromJSON (builtins.readFile ./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 = ./.; + }) +.shellNix