Nix: move to devshell

This commit is contained in:
Jan Kremer 2024-04-04 22:28:32 +02:00
parent f91ff03006
commit 8c9f075a4e
Signed by: jan
GPG key ID: A7DA689CB3B078EC
5 changed files with 153 additions and 26 deletions

View file

@ -1,22 +1,26 @@
{
description = "Hugo website";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
description = "virtual environments";
inputs.devshell.url = "github:numtide/devshell";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs =
{ nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
devShells.default = pkgs.mkShell {
packages = [
pkgs.go
pkgs.hugo
];
inputs.flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
outputs = { self, flake-utils, devshell, nixpkgs, ... }:
flake-utils.lib.eachDefaultSystem (system: {
devShells.default =
let
pkgs = import nixpkgs {
inherit system;
overlays = [ devshell.overlays.default ];
};
in
pkgs.devshell.mkShell {
imports = [ (pkgs.devshell.importTOML ./devshell.toml) ];
};
}
);
});
}