-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
78 lines (70 loc) · 1.83 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{
inputs = {
# How to update the revision: `nix flake update --commit-lock-file`
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
};
outputs =
{ nixpkgs, ... }:
let
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
in
{
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
devShells = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = pkgs.mkShellNoCC {
# Realize nixd pkgs version inlay hints for stable channel instead of latest
NIX_PATH = "nixpkgs=${pkgs.path}";
buildInputs = with pkgs; [
# https://github.com/NixOS/nix/issues/730#issuecomment-162323824
bashInteractive
coreutils
findutils # xargs
nixfmt-rfc-style
nixd
gnumake
peco
typos
imagemagick
actionlint
vim
dprint
hugo
go_1_23
dart-sass
markdownlint-cli2
yaml-language-server
];
};
}
);
apps = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
hugo-nix = {
type = "app";
program = pkgs.lib.getExe (
pkgs.writeShellApplication {
name = "hugo-with-dependencies";
runtimeInputs = with pkgs; [
hugo
go_1_23
dart-sass
];
text = ''
hugo "$@"
'';
}
);
};
}
);
};
}