packages: export overlays as packages
This commit is contained in:
parent
7219c38712
commit
219975f9cc
4 changed files with 20 additions and 8 deletions
13
flake.nix
13
flake.nix
|
@ -12,7 +12,7 @@
|
||||||
let
|
let
|
||||||
inherit (builtins) attrNames attrValues readDir;
|
inherit (builtins) attrNames attrValues readDir;
|
||||||
inherit (nixos) lib;
|
inherit (nixos) lib;
|
||||||
inherit (lib) removeSuffix recursiveUpdate;
|
inherit (lib) removeSuffix recursiveUpdate genAttrs filterAttrs;
|
||||||
inherit (utils) pathsToImportedAttrs;
|
inherit (utils) pathsToImportedAttrs;
|
||||||
|
|
||||||
utils = import ./lib/utils.nix { inherit lib; };
|
utils = import ./lib/utils.nix { inherit lib; };
|
||||||
|
@ -54,7 +54,16 @@
|
||||||
in
|
in
|
||||||
pathsToImportedAttrs overlayPaths;
|
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 =
|
nixosModules =
|
||||||
let
|
let
|
||||||
|
|
|
@ -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 "$@"
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -19,4 +19,13 @@ in
|
||||||
|
|
||||||
systemPackages = with pkgs; [ qute qutebrowser mpv youtubeDL ];
|
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 "$@"
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue