Update flake

This commit is contained in:
Jan Kremer 2024-05-18 20:49:17 +02:00
parent 432fe893d7
commit 7cb8368f4f
Signed by: jan
GPG key ID: A7DA689CB3B078EC
2 changed files with 27 additions and 49 deletions

34
flake.lock generated
View file

@ -1,23 +1,5 @@
{ {
"nodes": { "nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1711681563, "lastModified": 1711681563,
@ -36,24 +18,8 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -1,22 +1,34 @@
{ {
description = "Hugo website"; description = "Hugo website";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = outputs =
{ nixpkgs, flake-utils, ... }: { nixpkgs, ... }:
flake-utils.lib.eachDefaultSystem ( let
system: systems = [
let "x86_64-linux"
pkgs = nixpkgs.legacyPackages.${system}; "x86_64-darwin"
in ];
{ forAllSystems = f: nixpkgs.lib.genAttrs (systems) f;
devShells.default = pkgs.mkShell {
packages = [ devShell =
pkgs.go system:
pkgs.hugo 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;
};
} }