feat: separate custom pkgs from nixpkgs
This commit is contained in:
parent
66e3a03d7d
commit
384fe2a6e1
8 changed files with 43 additions and 34 deletions
common
|
@ -64,6 +64,7 @@
|
|||
nur.hmModules.nur
|
||||
|
||||
./home
|
||||
./pkgs
|
||||
|
||||
# Make the vars be the same on Nix and HM
|
||||
./vars.nix
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
nixpkgs.overlays = [
|
||||
(import ./blueberry)
|
||||
(import ./spotifywm)
|
||||
(import ./squeekboard)
|
||||
|
||||
neovim-flake.overlay
|
||||
|
|
3
common/overlays/spotifywm/default.nix
Normal file
3
common/overlays/spotifywm/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
(final: prev: {
|
||||
spotifywm = final.callPackage ./spotifywm.nix {};
|
||||
})
|
|
@ -1,12 +1,21 @@
|
|||
{...}: let
|
||||
mkPackage = name: (final: prev: {
|
||||
${name} = final.callPackage ./${name} {};
|
||||
});
|
||||
{lib, pkgs, ...}: let
|
||||
mkPackage = name: v: {
|
||||
${name} = pkgs.callPackage ./${name} {};
|
||||
};
|
||||
|
||||
rmNotPackage = name: value:
|
||||
value == "directory" &&
|
||||
builtins.pathExists ./${name}/default.nix;
|
||||
|
||||
packages = lib.attrsets.filterAttrs rmNotPackage (builtins.readDir ./.);
|
||||
|
||||
pkgSet = lib.attrsets.concatMapAttrs mkPackage packages;
|
||||
in {
|
||||
nixpkgs.overlays = [
|
||||
(mkPackage "coloryou")
|
||||
(mkPackage "input-emulator")
|
||||
(mkPackage "pam-fprint-grosshack")
|
||||
(mkPackage "spotifywm")
|
||||
];
|
||||
imports = [{
|
||||
options.customPkgs = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
};
|
||||
}];
|
||||
|
||||
customPkgs = pkgSet;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue