Update flake
This commit is contained in:
parent
432fe893d7
commit
7cb8368f4f
2 changed files with 27 additions and 49 deletions
42
flake.nix
42
flake.nix
|
|
@ -1,22 +1,34 @@
|
|||
{
|
||||
description = "Hugo website";
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
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
|
||||
];
|
||||
{ nixpkgs, ... }:
|
||||
let
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"x86_64-darwin"
|
||||
];
|
||||
forAllSystems = f: nixpkgs.lib.genAttrs (systems) f;
|
||||
|
||||
devShell =
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
default =
|
||||
with pkgs;
|
||||
mkShell {
|
||||
nativeBuildInputs = with pkgs; [
|
||||
go
|
||||
hugo
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
devShells = forAllSystems devShell;
|
||||
formatter.x86_64-darwin = nixpkgs.legacyPackages.x86_64-darwin.nixfmt-rfc-style;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue