summaryrefslogtreecommitdiff
path: root/overlays/default.nix
blob: 3037a94de6fe50b9185f9866e74e4f13c9fb8d6d (plain)
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
# This file defines overlays
{ pkgs, username, inputs, ... }: let 
  dmenu-src = builtins.fetchTarball "https://git.jptrzy.xyz/dmenu/snapshot/master.tar.gz";
  #dwm-src = builtins.fetchTarball "https://git.jptrzy.xyz/dwm/snapshot/master.tar.gz";
  dwmblocks-src = builtins.fetchTarball "https://git.jptrzy.xyz/dwmblocks/snapshot/master.tar.gz";
  sent-src = builtins.fetchTarball "https://git.jptrzy.xyz/sent/snapshot/master.tar.gz";
  slock-src = builtins.fetchTarball "https://git.jptrzy.xyz/slock/snapshot/master.tar.gz";
  dwm-src = /home/${username}/.local/src/dwm;
in {
  # This one brings our custom packages from the 'pkgs' directory
  additions = final: _prev: import ../pkgs {pkgs = final;};

  # This one contains whatever you want to overlay
  # You can change versions, add patches, set compilation flags, anything really.
  # https://nixos.wiki/wiki/Overlays
  modifications = final: prev: {
    # example = prev.example.overrideAttrs (oldAttrs: rec {
    # ...
    # });
    dmenu = prev.dmenu.overrideAttrs (old: { src = dmenu-src; });
    dwm = prev.dwm.overrideAttrs (old: { src = dwm-src; });
    dwmblocks = prev.dwmblocks.overrideAttrs (old: { src = dwmblocks-src; });
    sent = prev.dwm.overrideAttrs (old: { src = sent-src; });
    slock = prev.slock.overrideAttrs (old: {
      src = slock-src;
      buildInputs = with pkgs; [
        xorg.libXinerama
        xorg.libXft
        imlib2
      ] ++ old.buildInputs;
    });
  };

  # When applied, the unstable nixpkgs set (declared in the flake inputs) will
  # be accessible through 'pkgs.unstable'
  unstable-packages = final: _prev: {
    unstable = import inputs.nixpkgs-unstable {
      system = final.system;
      config.allowUnfree = true;
    };
  };
}
Software created with 💖