From c6d901c5b2808fb6fc52978f5bff94bdfeaec23c Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Tue, 25 Oct 2022 16:50:51 +0800 Subject: [PATCH] Update devshell to follow nixpkgs unstable branch --- flake.nix | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 79e8b5a..9b3fa94 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,25 @@ { - description = "The flake for this project."; - outputs = inputs@{ self, nixpkgs, ... }: { - devShell.x86_64-linux = import ./shell.nix { pkgs = import nixpkgs { system = "x86_64-linux"; }; }; + description = "The flake for this digital notebook."; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + + foo-dogsquared-nixos-config.url = "github:foo-dogsquared/nixos-config"; + foo-dogsquared-nixos-config.inputs.nixpkgs.follows = "nixpkgs"; + foo-dogsquared-nixos-config.inputs.flake-utils.follows = "flake-utils"; + }; + + outputs = inputs@{ self, nixpkgs, ... }: let + overlays = [ + inputs.foo-dogsquared-nixos-config.overlays.default + ]; + defaultSystem = inputs.flake-utils.lib.system.x86_64-linux; + systems = with inputs.flake-utils.lib.system; [ defaultSystem ]; + forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system); + in { + devShells = forAllSystems (system: let + pkgs = import nixpkgs { inherit system overlays; }; + in + { default = import ./shell.nix { inherit pkgs; }; }); }; }