-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoverlays.nix
92 lines (85 loc) · 2.94 KB
/
overlays.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
85
86
87
88
89
90
91
92
# This file defines overlays
{inputs, ...}: rec {
# This one brings our custom packages from the 'packages' directory
additions = final: _prev: import ./packages final _prev;
# This one contains whatever you want to overlay
# You can change versions, add patches, set compilation flags, anything really.
# https://nixos.wiki/wiki/Overlays
my_vim_plugins = final: prev: {
vimPlugins =
prev.vimPlugins
// {
vim-codeium = prev.vimUtils.buildVimPlugin {
name = "codeium.vim";
src = inputs.vim-codeium;
};
vim-perforce = prev.vimUtils.buildVimPlugin {
name = "vim-perforce";
src = inputs.vim-perforce;
};
spelunker-vim = prev.vimUtils.buildVimPlugin {
name = "spelunker.vim";
src = inputs.vim-spelunker;
};
};
};
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
# be accessible through 'pkgs.unstable'
unstable-nixos = final: _prev: let
inherit (final) system;
patches = [
# {
# # add conda
# url = "https://patch-diff.githubusercontent.com/raw/NixOS/nixpkgs/pull/296461.diff";
# hash = "sha256-Xrfgg4aVB1u2HlBkA+RN5U5//XPbRR6WeTlpT7hB3Lc=";
# }
{
# add gitbutler
url = "https://patch-diff.githubusercontent.com/raw/NixOS/nixpkgs/pull/289664.diff";
hash = "sha256-ZzodY4kr8tq/Vo0kZEwTzxDkuiPx7xRqCcvTkb/cltk=";
}
];
originPkgs = inputs.nixos-unstable.legacyPackages.${system};
nixpkgs-unstable = originPkgs.applyPatches {
name = "nixpkgs-patched";
src = inputs.nixos-unstable;
patches = map originPkgs.fetchpatch patches;
};
in {
unstable = import nixpkgs-unstable {
inherit (final) system;
config.allowUnfree = final.config.allowUnfree;
overlays = [my_vim_plugins inputs.nvim-codeium.overlays.${system}.default];
};
};
unstable-nixpkgs = final: _prev: let
inherit (final) system;
patches = [
# {
# # add conda
# url = "https://patch-diff.githubusercontent.com/raw/NixOS/nixpkgs/pull/296461.diff";
# hash = "sha256-Xrfgg4aVB1u2HlBkA+RN5U5//XPbRR6WeTlpT7hB3Lc=";
# }
{
# add gitbutler
url = "https://patch-diff.githubusercontent.com/raw/NixOS/nixpkgs/pull/289664.diff";
hash = "sha256-ZzodY4kr8tq/Vo0kZEwTzxDkuiPx7xRqCcvTkb/cltk=";
}
];
originPkgs = inputs.nixpkgs-unstable.legacyPackages.${system};
nixpkgs-unstable = originPkgs.applyPatches {
name = "nixpkgs-patched";
src = inputs.nixpkgs-unstable;
patches = map originPkgs.fetchpatch patches;
};
in {
unstable = import nixpkgs-unstable {
inherit (final) system;
config.allowUnfree = final.config.allowUnfree;
overlays = [my_vim_plugins inputs.nvim-codeium.overlays.${system}.default];
};
};
other-packages = final: prev: {
inherit (inputs.flox.packages.x86_64-linux) flox;
};
}