feat: switched to purely nix based devshell
This commit is contained in:
parent
bc43c0120c
commit
8b8ae5a73f
|
@ -1,2 +1,2 @@
|
|||
nix_direnv_watch_file ./flake.nix
|
||||
nix_direnv_watch_file ./devshell.nix
|
||||
use flake
|
||||
|
|
40
default/devshell.nix
Normal file
40
default/devshell.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
nixpkgs,
|
||||
devshell,
|
||||
...
|
||||
}: system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [devshell.overlays.default];
|
||||
};
|
||||
shell = with pkgs; {
|
||||
name = "devshell template";
|
||||
packages = [
|
||||
nil
|
||||
sl
|
||||
];
|
||||
commands = [
|
||||
{
|
||||
package = statix;
|
||||
help = "The nix linter";
|
||||
}
|
||||
{
|
||||
package = alejandra;
|
||||
help = "The nix formatter";
|
||||
}
|
||||
{
|
||||
name = "test";
|
||||
help = "very helpful";
|
||||
command = "echo hehe";
|
||||
}
|
||||
];
|
||||
|
||||
env = [
|
||||
{
|
||||
name = "lol";
|
||||
value = "lel";
|
||||
}
|
||||
];
|
||||
};
|
||||
in
|
||||
pkgs.devshell.mkShell shell
|
|
@ -1,16 +0,0 @@
|
|||
[devshell]
|
||||
name = "Patricks tolle devshell"
|
||||
|
||||
packages = [
|
||||
"nil",
|
||||
"sl"
|
||||
]
|
||||
|
||||
[[env]]
|
||||
name = "lol"
|
||||
value = "lel"
|
||||
|
||||
[[commands]]
|
||||
name = "test"
|
||||
help = "very helpful"
|
||||
command = "echo lul"
|
|
@ -12,15 +12,10 @@
|
|||
nixpkgs,
|
||||
flake-utils,
|
||||
devshell,
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [devshell.overlays.default];
|
||||
};
|
||||
in {
|
||||
devShell = pkgs.devshell.mkShell {
|
||||
imports = [(pkgs.devshell.importTOML ./devshell.toml)];
|
||||
};
|
||||
});
|
||||
} @ inputs:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system: {
|
||||
devShell = import ./devshell.nix inputs system;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue