Compare commits
No commits in common. "f9eaffdaf3fe159628975a1bb7e0d5d09122d589" and "df009217c9bf670836f7ddfc1c45f137ed15b7ad" have entirely different histories.
f9eaffdaf3
...
df009217c9
8
.envrc
8
.envrc
|
@ -1,8 +0,0 @@
|
|||
use_flake() {
|
||||
watch_file flake.nix
|
||||
watch_file flake.lock
|
||||
eval "$(nix print-dev-env)"
|
||||
}
|
||||
|
||||
use flake
|
||||
eval "$shellHooks"
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1 @@
|
|||
/public/
|
||||
.pre-commit-config.yaml
|
||||
|
|
69
flake.lock
69
flake.lock
|
@ -1,69 +0,0 @@
|
|||
{
|
||||
"nodes": {
|
||||
"futils": {
|
||||
"locked": {
|
||||
"lastModified": 1622445595,
|
||||
"narHash": "sha256-m+JRe6Wc5OZ/mKw2bB3+Tl0ZbtyxxxfnAWln8Q5qs+Y=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "7d706970d94bc5559077eb1a6600afddcd25a7c8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"ref": "master",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1622282707,
|
||||
"narHash": "sha256-+GOrUDsdneUqrOm9d+9bHXjEVoVcU8tm14WGVzbt6gg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6933d068c5d2fcff398e802f7c4e271bbdab6705",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pre-commit-hooks": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"futils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1621411868,
|
||||
"narHash": "sha256-R+7OQ2JYFCb3E7Jl7LhRifzMVCR6Gl8R98zYsNhZtJ8=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "2e7fac06108b4fc81f5ff9ed9a02bc4f6ede7001",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"ref": "master",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"futils": "futils",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"pre-commit-hooks": "pre-commit-hooks"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
77
flake.nix
77
flake.nix
|
@ -1,77 +0,0 @@
|
|||
{
|
||||
description = "Ambroisie's blog";
|
||||
|
||||
inputs = {
|
||||
futils = {
|
||||
type = "github";
|
||||
owner = "numtide";
|
||||
repo = "flake-utils";
|
||||
ref = "master";
|
||||
};
|
||||
|
||||
# https://nixpk.gs/pr-tracker.html?pr=124808
|
||||
nixpkgs = {
|
||||
type = "github";
|
||||
owner = "NixOS";
|
||||
repo = "nixpkgs";
|
||||
ref = "nixos-unstable";
|
||||
};
|
||||
|
||||
pre-commit-hooks = {
|
||||
type = "github";
|
||||
owner = "cachix";
|
||||
repo = "pre-commit-hooks.nix";
|
||||
ref = "master";
|
||||
inputs = {
|
||||
flake-utils.follows = "futils";
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, futils, nixpkgs, pre-commit-hooks } @ inputs:
|
||||
futils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
inherit (nixpkgs) lib;
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
checks = {
|
||||
pre-commit = pre-commit-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
|
||||
hooks = {
|
||||
nixpkgs-fmt = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
markdown-lint = {
|
||||
enable = true;
|
||||
|
||||
name = "Lint each post's markdown";
|
||||
|
||||
entry =
|
||||
let
|
||||
pkg = pkgs.nodePackages.markdownlint-cli;
|
||||
in
|
||||
"${pkg}/bin/markdownlint";
|
||||
|
||||
types = [ "markdown" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
devShell = pkgs.mkShell {
|
||||
name = "blog";
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
gnumake
|
||||
hugo
|
||||
];
|
||||
|
||||
inherit (self.checks.${system}.pre-commit) shellHook;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
Loading…
Reference in a new issue