Skip to content

Commit

Permalink
make an overlay and call it from everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHicks committed Aug 21, 2021
1 parent 62f0e49 commit 44121f0
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 4 deletions.
19 changes: 18 additions & 1 deletion flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions flake.nix
Expand Up @@ -5,9 +5,30 @@
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";

tmux = {
url = "github:tmux/tmux";
flake = false;
};
};

outputs = inputs: {
overlay = 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" ];
}
);
};

nixosConfigurations.torch = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
Expand Down
3 changes: 2 additions & 1 deletion machines/torch/default.nix
Expand Up @@ -11,11 +11,12 @@ inputs:
"${inputs.nixos-hardware}/apple/macbook-pro/12-1"

# system setup
(import ../../nixos/nix inputs)

../../nixos/bluetooth
../../nixos/brian
../../nixos/gnome-keyring
../../nixos/networkmanager
../../nixos/nix
../../nixos/upower
../../nixos/xmonad
];
Expand Down
3 changes: 2 additions & 1 deletion machines/vbox-dev/default.nix
Expand Up @@ -9,8 +9,9 @@ inputs:
[ # Include the results of the hardware scan.
./hardware-configuration.nix

(import ../../nixos/nix inputs)

../../nixos/brian
../../nixos/nix
../../nixos/xmonad
../../nixos/xserver
];
Expand Down
6 changes: 5 additions & 1 deletion nixos/nix/default.nix
@@ -1,3 +1,4 @@
inputs:
{ pkgs, ... }: {
nix = {
# TODO: might have to disable this to get home-manager working
Expand All @@ -7,5 +8,8 @@
'';
};

nixpkgs.config.allowUnfree = true;
nixpkgs = {
config.allowUnfree = true;
overlays = [ inputs.self.overlay ];
};
}

0 comments on commit 44121f0

Please sign in to comment.