-
Notifications
You must be signed in to change notification settings - Fork 0
/
apps.nix
84 lines (84 loc) · 2.19 KB
/
apps.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
79
80
81
82
83
84
{ pkgs, ... }:
let
mkApp =
{
name,
inputs ? [ ],
script,
}:
{
type = "app";
program = pkgs.writeShellApplication {
inherit name;
runtimeInputs = inputs;
text = script;
};
};
in
{
apps = {
show-inputs = mkApp {
name = "show-inputs";
inputs = with pkgs; [
jq
coreutils
];
script = "nix flake metadata --json | jq -r '.locks.nodes | keys[]'";
};
update-ddc-plugins = mkApp {
name = "update-ddc-plugins";
inputs = with pkgs; [
jq
coreutils
];
script = ''
nix flake metadata --json | jq -r '.locks.nodes | keys[]' | grep ddc | xargs -I {} nix flake lock --update-input {}
nix flake lock --update-input neco-vim
nix flake lock --update-input vim-mr
nix flake lock --update-input pum-vim
nix flake lock --update-input denops-popup-preview-vim
nix flake lock --update-input denops-signature_help
'';
};
update-ddu-plugins = mkApp {
name = "update-ddu-plugins";
inputs = with pkgs; [
jq
coreutils
];
script = ''
nix flake metadata --json | jq -r '.locks.nodes | keys[]' | grep ddu | xargs -I {} nix flake lock --update-input {}
'';
};
update-neorg-plugins = mkApp {
name = "update-ddu-plugins";
inputs = with pkgs; [
jq
coreutils
];
script = ''
nix flake metadata --json | jq -r '.locks.nodes | keys[]' | grep neorg | xargs -I {} nix flake lock --update-input {}
'';
};
update-telescope-plugins = mkApp {
name = "update-telescope-plugins";
inputs = with pkgs; [
jq
coreutils
];
script = ''
nix flake metadata --json | jq -r '.locks.nodes | keys[]' | grep telescope | xargs -I {} nix flake lock --update-input {}
'';
};
update-neotest-plugins = mkApp {
name = "update-telescope-plugins";
inputs = with pkgs; [
jq
coreutils
];
script = ''
nix flake metadata --json | jq -r '.locks.nodes | keys[]' | grep neotest | xargs -I {} nix flake lock --update-input {}
'';
};
};
}