From 097d3b3a73d0650175a38568c2484a5b766cbe6e Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Mon, 1 Apr 2024 13:02:15 +0900 Subject: [PATCH] Prefer stable pkgs for bash and basics https://github.com/NixOS/nixpkgs/issues/300055 https://github.com/kachick/dotfiles/pull/532 --- flake.lock | 25 +++++++++++++++++++++---- flake.nix | 21 ++++++++++++--------- 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/flake.lock b/flake.lock index fa6bbfd..62df4ce 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "edge-nixpkgs": { + "locked": { + "lastModified": 1711703276, + "narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d8fe5e6c92d0d190646fb9f1056741a229980089", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -20,22 +36,23 @@ }, "nixpkgs": { "locked": { - "lastModified": 1711703276, - "narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=", + "lastModified": 1711668574, + "narHash": "sha256-u1dfs0ASQIEr1icTVrsKwg2xToIpn7ZXxW3RHfHxshg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d8fe5e6c92d0d190646fb9f1056741a229980089", + "rev": "219951b495fc2eac67b1456824cc1ec1fd2ee659", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixos-23.11", "repo": "nixpkgs", "type": "github" } }, "root": { "inputs": { + "edge-nixpkgs": "edge-nixpkgs", "flake-utils": "flake-utils", "nixpkgs": "nixpkgs" } diff --git a/flake.nix b/flake.nix index d6b439f..67c779f 100644 --- a/flake.nix +++ b/flake.nix @@ -5,32 +5,35 @@ # - https://discourse.nixos.org/t/differences-between-nix-channels/13998 # How to update the revision # - `nix flake update --commit-lock-file` # https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake-update.html - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + edge-nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; }; - outputs = { self, nixpkgs, flake-utils }: + outputs = { self, nixpkgs, edge-nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system: - let pkgs = nixpkgs.legacyPackages.${system}; + let + pkgs = nixpkgs.legacyPackages.${system}; + edge-pkgs = edge-nixpkgs.legacyPackages.${system}; in { # Q. Why nixfmt? Not nixpkgs-fmt and alejandra? # A. nixfmt will be official # - https://github.com/NixOS/nixfmt/issues/153 # - https://github.com/NixOS/nixfmt/issues/129 # - https://github.com/NixOS/rfcs/pull/166 - formatter = pkgs.nixfmt; + formatter = edge-pkgs.nixfmt; devShells.default = with pkgs; mkShell { buildInputs = [ # https://github.com/NixOS/nix/issues/730#issuecomment-162323824 # https://github.com/kachick/dotfiles/pull/228 bashInteractive + edge-pkgs.nixfmt + edge-pkgs.nil - nixfmt - nil - dprint - typos - go-task + edge-pkgs.dprint + edge-pkgs.typos + edge-pkgs.go-task ]; }; });