refactor(pkgs): use haumea for automatic callPackage
22
flake.lock
generated
@@ -534,6 +534,27 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"haumea": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1685133229,
|
||||
"narHash": "sha256-FePm/Gi9PBSNwiDFq3N+DWdfxFq0UKsVVTJS3cQPn94=",
|
||||
"owner": "nix-community",
|
||||
"repo": "haumea",
|
||||
"rev": "34dd58385092a23018748b50f9b23de6266dffc2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "v0.2.2",
|
||||
"repo": "haumea",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -1092,6 +1113,7 @@
|
||||
"darkly": "darkly",
|
||||
"fenix": "fenix",
|
||||
"go-musicfox": "go-musicfox",
|
||||
"haumea": "haumea",
|
||||
"home-manager": "home-manager_2",
|
||||
"impermanence": "impermanence",
|
||||
"infuse": "infuse",
|
||||
|
||||
22
flake.nix
@@ -57,6 +57,9 @@
|
||||
|
||||
infuse.url = "git+https://codeberg.org/amjoseph/infuse.nix";
|
||||
infuse.flake = false;
|
||||
|
||||
haumea.url = "github:nix-community/haumea/v0.2.2";
|
||||
haumea.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs =
|
||||
@@ -81,12 +84,25 @@
|
||||
final: prev: {
|
||||
inherit (inputs.home-manager.lib) hm;
|
||||
inherit infuse;
|
||||
haumea = inputs.haumea.lib;
|
||||
}
|
||||
);
|
||||
infuse = (import inputs.infuse { inherit (nixpkgs) lib; }).v1.infuse;
|
||||
in
|
||||
{
|
||||
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
||||
packages = forAllSystems (
|
||||
system:
|
||||
lib.haumea.load {
|
||||
src = ./pkgs;
|
||||
loader = [
|
||||
{
|
||||
matches = str: builtins.match ".*\\.nix" str != null;
|
||||
loader = _: path: nixpkgs.legacyPackages.${system}.callPackage path { };
|
||||
}
|
||||
];
|
||||
transformer = lib.haumea.transformers.liftDefault;
|
||||
}
|
||||
);
|
||||
|
||||
# workaround for "treefmt warning"
|
||||
formatter = forAllSystems (
|
||||
@@ -108,7 +124,9 @@
|
||||
}
|
||||
);
|
||||
|
||||
overlays = import ./overlays { inherit inputs infuse; };
|
||||
overlays = import ./overlays {
|
||||
inherit inputs lib;
|
||||
};
|
||||
|
||||
nixosConfigurations = forAllHosts (
|
||||
hostname:
|
||||
|
||||
@@ -1,10 +1,24 @@
|
||||
{ inputs, infuse, ... }:
|
||||
{
|
||||
additions = final: prev: import ../pkgs prev;
|
||||
inputs,
|
||||
lib,
|
||||
}:
|
||||
{
|
||||
additions =
|
||||
final: prev:
|
||||
lib.haumea.load {
|
||||
src = ../pkgs;
|
||||
loader = [
|
||||
{
|
||||
matches = str: builtins.match ".*\\.nix" str != null;
|
||||
loader = _: path: final.callPackage path { };
|
||||
}
|
||||
];
|
||||
transformer = lib.haumea.transformers.liftDefault;
|
||||
};
|
||||
|
||||
modifications =
|
||||
final: prev:
|
||||
infuse prev {
|
||||
lib.infuse prev {
|
||||
cage.__output.patches.__append = [ ./cage-specify-output-name.patch ];
|
||||
matrix-synapse.__assign = final.stable.matrix-synapse;
|
||||
bottles.__input.removeWarningPopup.__assign = true;
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
pkgs:
|
||||
let
|
||||
packages = [
|
||||
"win11-icon-theme"
|
||||
"mono-gtk-theme"
|
||||
"fcitx5-themes"
|
||||
"fcitx5-lightly"
|
||||
"fluent-fcitx5"
|
||||
"wps-office-fonts"
|
||||
"ttf-wps-fonts"
|
||||
"translate-shell"
|
||||
];
|
||||
in
|
||||
pkgs.lib.genAttrs packages (package: pkgs.callPackage ./${package}.nix { })
|
||||
|
Before Width: | Height: | Size: 177 B After Width: | Height: | Size: 177 B |
|
Before Width: | Height: | Size: 777 B After Width: | Height: | Size: 777 B |
|
Before Width: | Height: | Size: 93 B After Width: | Height: | Size: 93 B |
|
Before Width: | Height: | Size: 630 B After Width: | Height: | Size: 630 B |
|
Before Width: | Height: | Size: 204 B After Width: | Height: | Size: 204 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 226 B After Width: | Height: | Size: 226 B |
|
Before Width: | Height: | Size: 597 B After Width: | Height: | Size: 597 B |