1
1
mirror of https://github.com/divnix/digga.git synced 2024-11-23 20:22:04 +03:00

packages: export overlays as packages

This commit is contained in:
Timothy DeHerrera 2020-08-02 21:26:00 -06:00
parent 7219c38712
commit 219975f9cc
No known key found for this signature in database
GPG Key ID: 8985725DB5B0C122
4 changed files with 20 additions and 8 deletions

View File

@ -12,7 +12,7 @@
let
inherit (builtins) attrNames attrValues readDir;
inherit (nixos) lib;
inherit (lib) removeSuffix recursiveUpdate;
inherit (lib) removeSuffix recursiveUpdate genAttrs filterAttrs;
inherit (utils) pathsToImportedAttrs;
utils = import ./lib/utils.nix { inherit lib; };
@ -54,7 +54,16 @@
in
pathsToImportedAttrs overlayPaths;
packages."${system}" = (self.overlay osPkgs osPkgs);
packages."${system}" =
let
packages = self.overlay osPkgs osPkgs;
overlays = lib.filterAttrs (n: v: n != "pkgs") self.overlays;
overlayPkgs =
genAttrs
(attrNames overlays)
(name: (overlays."${name}" osPkgs osPkgs)."${name}");
in
recursiveUpdate packages overlayPkgs;
nixosModules =
let

View File

@ -1,6 +0,0 @@
final: prev: {
# wrapper to specify config file
qute = prev.writeShellScriptBin "qute" ''
QT_QPA_PLATFORMTHEME= exec ${prev.qutebrowser}/bin/qutebrowser -C /etc/xdg/qutebrowser/config.py "$@"
'';
}

View File

@ -19,4 +19,13 @@ in
systemPackages = with pkgs; [ qute qutebrowser mpv youtubeDL ];
};
nixpkgs.overlays = [
(final: prev: {
# wrapper to specify config file
qute = prev.writeShellScriptBin "qute" ''
QT_QPA_PLATFORMTHEME= exec ${prev.qutebrowser}/bin/qutebrowser -C /etc/xdg/qutebrowser/config.py "$@"
'';
})
];
}