From 54c733b378f5f716286612058368846c838c1175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Gro=C3=9Fmann?= Date: Mon, 22 May 2023 20:38:10 +0900 Subject: [PATCH] feat: added devshell support --- .gitignore | 1 + default/.envrc | 2 ++ default/.gitignore | 1 + default/devshell.toml | 12 ++++++++++++ default/flake.nix | 13 ++++++++----- 5 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 .gitignore create mode 100644 default/.envrc create mode 100644 default/.gitignore create mode 100644 default/devshell.toml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..92b2793 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.direnv diff --git a/default/.envrc b/default/.envrc new file mode 100644 index 0000000..26e7fb8 --- /dev/null +++ b/default/.envrc @@ -0,0 +1,2 @@ +nix_direnv_watch_file ./flake.nix +use flake diff --git a/default/.gitignore b/default/.gitignore new file mode 100644 index 0000000..92b2793 --- /dev/null +++ b/default/.gitignore @@ -0,0 +1 @@ +.direnv diff --git a/default/devshell.toml b/default/devshell.toml new file mode 100644 index 0000000..e59a64b --- /dev/null +++ b/default/devshell.toml @@ -0,0 +1,12 @@ +[devshell] +name = "Patricks tolle devshell" + +packages = [ + "nil", + "sl" +] + +[[env]] +name = "lol" +value = "lel" + diff --git a/default/flake.nix b/default/flake.nix index b255dac..feb5952 100644 --- a/default/flake.nix +++ b/default/flake.nix @@ -4,20 +4,23 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; + devshell.url = "github:numtide/devshell"; }; outputs = { self, nixpkgs, flake-utils, + devshell, }: flake-utils.lib.eachDefaultSystem (system: let - pkgs = import nixpkgs {inherit system;}; + pkgs = import nixpkgs { + inherit system; + overlays = [devshell.overlays.default]; + }; in { - devShells.default = pkgs.mkShell { - packages = with pkgs; [ - st - ]; + devShell = pkgs.devshell.mkShell { + imports = [(pkgs.devshell.importTOML ./devshell.toml)]; }; }); }