From 693d10475c8759b345ec5d861e609d1f582de6fc Mon Sep 17 00:00:00 2001 From: r17x Date: Thu, 17 Oct 2024 20:05:54 +0700 Subject: [PATCH] feat(nix): using nix (CLI) from master branch --- flake.lock | 104 +++++++++++++++++++++++++++++++++++++-- flake.nix | 3 ++ nix/default.nix | 3 +- nix/overlays/default.nix | 1 + 4 files changed, 106 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index d588acb..376cc36 100644 --- a/flake.lock +++ b/flake.lock @@ -69,6 +69,39 @@ "type": "github" } }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_2" + }, + "locked": { + "lastModified": 1714606777, + "narHash": "sha256-bMkNmAXLj8iyTvxaaD/StcLSadbj1chPcJOjtuVnLmA=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "4d34ce6412bc450b1d4208c953dc97c7fc764f1a", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-root": { + "locked": { + "lastModified": 1713493429, + "narHash": "sha256-ztz8JQkI08tjKnsTpfLqzWoKFQF4JGu2LRz8bkdnYUk=", + "owner": "srid", + "repo": "flake-root", + "rev": "bc748b93b86ee76e2032eecda33440ceb2532fcd", + "type": "github" + }, + "original": { + "owner": "srid", + "repo": "flake-root", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -293,6 +326,29 @@ "type": "github" } }, + "nixd": { + "inputs": { + "flake-parts": "flake-parts_2", + "flake-root": "flake-root", + "nixpkgs": [ + "nixpkgs" + ], + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1727793617, + "narHash": "sha256-vZ+t0jvKZczYBB9ZAj7CQ1sBv9PE66G9/LkB6a+Iogg=", + "owner": "nix-community", + "repo": "nixd", + "rev": "c38702b17580a31e84c958b5feed3d8c7407f975", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixd", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1706487304, @@ -321,13 +377,31 @@ "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" } }, + "nixpkgs-lib_2": { + "locked": { + "dir": "lib", + "lastModified": 1714253743, + "narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-master": { "locked": { - "lastModified": 1727294711, - "narHash": "sha256-7G6JIC7Vb26C48oFmpwOr1OuOJK8YEJwF3w3yN7Byyc=", + "lastModified": 1729171787, + "narHash": "sha256-a91n/BjOXl/QLi6rs4JK6fBDra5jnpZ3TWX6x5eF/aw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c7412922a1d6acdc40250ba8e6460fd39c3fc2c7", + "rev": "7da0a62f4cf80ddb435ac34f5b9e4b166d959704", "type": "github" }, "original": { @@ -403,7 +477,7 @@ "nixpkgs" ], "nuschtosSearch": "nuschtosSearch", - "treefmt-nix": "treefmt-nix" + "treefmt-nix": "treefmt-nix_2" }, "locked": { "lastModified": 1728428263, @@ -510,6 +584,7 @@ "iamb": "iamb", "nix-darwin": "nix-darwin", "nix-env": "nix-env", + "nixd": "nixd", "nixpkgs": [ "nixpkgs-unstable" ], @@ -682,6 +757,27 @@ } }, "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nixd", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722330636, + "narHash": "sha256-uru7JzOa33YlSRwf9sfXpJG+UAV+bnBEYMjrzKrQZFw=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "768acdb06968e53aa1ee8de207fd955335c754b7", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_2": { "inputs": { "nixpkgs": [ "nixvim", diff --git a/flake.nix b/flake.nix index 60f58a8..4da54c9 100644 --- a/flake.nix +++ b/flake.nix @@ -25,6 +25,9 @@ nixpkgs-stable.url = "github:NixOS/nixpkgs/release-24.05"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; nixpkgs.follows = "nixpkgs-unstable"; + ### -- nix related tools + nixd.url = "github:nix-community/nixd"; + nixd.inputs.nixpkgs.follows = "nixpkgs"; ## -- Languages ocaml-overlay.url = "github:nix-ocaml/nix-overlays"; diff --git a/nix/default.nix b/nix/default.nix index 5d149c5..f3dc828 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -23,6 +23,7 @@ let overlays = [ inputs.ocaml-overlay.overlays.default + inputs.nixd.overlays.default ] ++ lib.attrValues self.overlays; in rec { @@ -33,7 +34,7 @@ inherit (pkgs) stdenv; } // { - package = branches.stable.nix; + package = branches.master.nix; }; pkgs = import inputs.nixpkgs { diff --git a/nix/overlays/default.nix b/nix/overlays/default.nix index e6449b9..bc163f6 100644 --- a/nix/overlays/default.nix +++ b/nix/overlays/default.nix @@ -27,6 +27,7 @@ }); nixfmt = prev.nixfmt-rfc-style; + sketchybar-app-font = prev.stdenv.mkDerivation { name = "sketchybar-app-font"; src = inputs.sketchybar-app-font;