From 7f5f01ef3d3eb56a24db31b7ddf85fc4ce3b37fc Mon Sep 17 00:00:00 2001 From: "quentin@aristote.fr" Date: Sun, 17 Sep 2023 18:39:06 +0200 Subject: flake: add devenv --- flake.nix | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 024f56d..2a38ab0 100644 --- a/flake.nix +++ b/flake.nix @@ -1,9 +1,32 @@ { description = "Quentin Aristote's personal information."; - outputs = { self, nixpkgs, flake-utils }: - flake-utils.lib.eachDefaultSystem (system: - let pkgs = nixpkgs.legacyPackages.${system}; - in { formatWith = markup: import ./default.nix { inherit markup pkgs; }; }); -} + inputs = { + devenv.url = "github:cachix/devenv"; + my-nixpkgs.url = "github:qaristote/my-nixpkgs"; + nixpkgs = {}; + }; + + nixConfig = { + extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="; + extra-trusted-substituters = "https://devenv.cachix.org"; + }; + outputs = { + flake-parts, + my-nixpkgs, + ... + } @ inputs: + flake-parts.lib.mkFlake {inherit inputs;} { + imports = builtins.attrValues {inherit (my-nixpkgs.flakeModules) personal devenv;}; + flake.lib.formatWith = attrs: import ./default.nix attrs; + perSystem = { + devenv.shells.default = { + languages.nix = { + enable = true; + packaging.enable = true; + }; + }; + }; + }; +} -- cgit v1.2.3