/
flake.nix
80 lines (66 loc) · 2.43 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
{
description = "Brian's Dotfiles";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-21.05";
nixos-hardware.url = "github:NixOS/nixos-hardware";
home-manager.url = "github:nix-community/home-manager/release-21.05";
similar-sort.url =
"git+https://git.bytes.zone/brian/similar-sort.git?ref=main";
similar-sort.inputs.nixpkgs.follows = "nixpkgs";
tmux = {
url = "github:tmux/tmux";
flake = false;
};
fzf-tab = {
url = "github:Aloxaf/fzf-tab";
flake = false;
};
comma = {
url = "github:shopify/comma";
flake = false;
};
};
outputs = inputs:
let
mkOverlays = system: [
inputs.similar-sort.overlay."${system}"
(final: prev: {
tmux = prev.tmux.overrideAttrs (attrs:
attrs // {
src = inputs.tmux;
# macOS does some weird stuff with locales and character widths.
# Practically, that means that without extra support tmux will
# behave weirdly around multi-byte characters like emoji. Enabling
# utf8proc support should backfill the right tables so that tmux
# can get the correct character widths.
buildInputs = attrs.buildInputs ++ [ prev.utf8proc ];
configureFlags = attrs.configureFlags ++ [ "--enable-utf8proc" ];
});
git-gclone = final.callPackage ./pkgs/git-gclone { };
# is this going to cause problems by not actually being a package?
fzf-tab = inputs.fzf-tab;
lazygit-window = final.callPackage ./pkgs/lazygit-window { };
tmux-session = final.callPackage ./pkgs/tmux-session { };
comma = final.callPackage inputs.comma { };
kak-session = final.callPackage ./pkgs/kak-session { };
})
];
in {
nixosConfigurations.torch = inputs.nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [
({ ... }: { nixpkgs.overlays = mkOverlays system; })
(import ./machines/torch inputs)
inputs.home-manager.nixosModules.home-manager
];
};
nixosConfigurations.vbox-dev = inputs.nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [
({ ... }: { nixpkgs.overlays = mkOverlays system; })
(import ./machines/vbox-dev inputs)
inputs.home-manager.nixosModules.home-manager
];
};
};
}