-
Notifications
You must be signed in to change notification settings - Fork 23
/
flake.nix
126 lines (112 loc) · 4.88 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
{
description = "JavaCafe's NixOS configuration";
inputs = {
discocss.url = "github:mlvzk/discocss/flake";
home.url = "github:nix-community/home-manager";
nur.url = "github:nix-community/NUR";
nixpkgs-f2k.url = "github:fortuneteller2k/nixpkgs-f2k";
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
master.url = "github:nixos/nixpkgs/master";
stable.url = "github:nixos/nixpkgs/nixos-21.11";
unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland?rev=3716a3aea917103d20330c13cd40b956f8e51078";
nixvim.url = "github:pta2002/nixvim";
eww.url = "github:elkowar/eww";
emacs.url = "github:nix-community/emacs-overlay";
# Non Flakes
phocus = { url = "github:JavaCafe01/gtk"; flake = false; };
addy-bitmap-fonts = { url = "github:addy-dclxvi/bitmap-font-collections"; flake = false; };
zsh-completions = { url = "github:zsh-users/zsh-completions"; flake = false; };
zsh-syntax-highlighting = { url = "github:zsh-users/zsh-syntax-highlighting"; flake = false; };
fzf-tab = { url = "github:Aloxaf/fzf-tab"; flake = false; };
teal = { url = "github:teal-language/tl"; flake = false; };
unclutter-xfixes-nowrep = { url = "github:nowrep/unclutter-xfixes"; flake = false; };
themer-lua-nvim = { url = "github:JavaCafe01/themer.lua/dev"; flake = false; };
galaxyline-nvim = { url = "github:NTBBloodbath/galaxyline.nvim"; flake = false; };
sworkstyle = { url = "github:Lyr-7D1h/swayest_workstyle"; flake = false; };
nixpkgs.follows = "unstable";
};
outputs =
{ self, home, nixpkgs, discocss, nixpkgs-f2k, nixpkgs-wayland, nixvim, ... }@inputs:
with nixpkgs.lib;
let
config = {
allowBroken = true;
allowUnfree = true;
tarball-ttl = 0;
};
filterNixFiles = k: v: v == "regular" && hasSuffix ".nix" k;
importNixFiles = path:
(lists.forEach (mapAttrsToList (name: _: path + ("/" + name))
(filterAttrs filterNixFiles (builtins.readDir path)))) import;
overlays = with inputs;
[
(final: _:
let system = final.system;
in
{
# Packages provided by flake inputs
eww-way = eww.packages.${system}.eww-wayland;
discocss = discocss.defaultPackage.${system};
neovim-nightly = neovim.packages.${system}.neovim;
nixvim = nixvim.defaultPackage.${system};
} // (with nixpkgs-f2k.packages.${system}; {
# Overlays with f2k's repo
awesome = awesome-git;
picom = picom-git;
river = river-git;
kile-wl = kile-wl-git;
}) // (with nixpkgs-wayland.packages.${system}; {
# Wayland Stuff
# foot = foot;
mako = mako;
slurp = slurp;
swaybg = swaybg;
swayidle = swayidle;
swaylock = swaylock;
sway-git = sway-unwrapped;
waybar = waybar;
wayfire = wayfire;
wdisplays = wdisplays;
wf-recorder = wf-recorder;
wlroots = wlroots;
wl-clipboard = wl-clipboard;
wtype = wtype;
xdg-desktop-portal-wlr = xdg-desktop-portal-wlr;
}) // {
# Non Flakes
phocus-src = phocus;
addy-bitmap-fonts-src = addy-bitmap-fonts;
zsh-completions-src = zsh-completions;
zsh-syntax-highlighting-src = zsh-syntax-highlighting;
fzf-tab-src = fzf-tab;
teal-src = teal;
unclutter-xfixes-nowrep-src = unclutter-xfixes-nowrep;
themer-lua-nvim-src = themer-lua-nvim;
galaxyline-nvim-src = galaxyline-nvim;
sworkstyle-src = sworkstyle;
/* Nixpkgs branches
One can access these branches like so:
`pkgs.stable.mpd'
`pkgs.master.linuxPackages_xanmod'
*/
master = import master { inherit config system; };
unstable = import unstable { inherit config system; };
stable = import stable { inherit config system; };
})
neovim-nightly-overlay.overlay
nur.overlay
nixpkgs-f2k.overlay
nixpkgs-wayland.overlay
emacs.overlay
]
# Overlays from ./overlays directory
++ (importNixFiles ./overlays);
in
{
nixosConfigurations.thonkpad = import ./thonkpad {
inherit config home inputs nixpkgs overlays discocss nixvim;
};
thonkpad = self.nixosConfigurations.thonkpad.config.system.build.toplevel;
};
}