Rework overlays
There are now two separate overlays: - backports - mitigations
This commit is contained in:
parent
9e15b68b79
commit
33f5a3db37
@ -87,7 +87,10 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
# various temporary fixes that automatically revert
|
# various temporary fixes that automatically revert
|
||||||
(import ./overlays self)
|
self.overlays.mitigations
|
||||||
|
|
||||||
|
# auto backports from nixpkgs unstable
|
||||||
|
self.overlays.backports
|
||||||
|
|
||||||
inputs.hyprwm-contrib.overlays.default
|
inputs.hyprwm-contrib.overlays.default
|
||||||
inputs.rust-overlay.overlays.default
|
inputs.rust-overlay.overlays.default
|
||||||
@ -284,6 +287,8 @@
|
|||||||
apps = eachSystem (system: import ./pkgs/apps.nix
|
apps = eachSystem (system: import ./pkgs/apps.nix
|
||||||
{ inherit (self.outputs) packages; inherit system; });
|
{ inherit (self.outputs) packages; inherit system; });
|
||||||
|
|
||||||
|
overlays = import ./overlays self;
|
||||||
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
slab = mkSystem {
|
slab = mkSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
20
overlays/backports.nix
Normal file
20
overlays/backports.nix
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
nixfiles: final: prev:
|
||||||
|
let
|
||||||
|
pkgs-unstable = import nixfiles.inputs.nixpkgs-unstable { config.allowUnfree = true; inherit (final) system; };
|
||||||
|
inherit (final) callPackage lib electron_28;
|
||||||
|
|
||||||
|
backport = pkg: let
|
||||||
|
inherit (lib) getAttrFromPath;
|
||||||
|
inherit (builtins) getAttr isString;
|
||||||
|
getAttr' = name: attrs: if isString pkg then getAttr name attrs else getAttrFromPath name attrs;
|
||||||
|
oldPkg = getAttr' pkg prev;
|
||||||
|
newPkg = getAttr' pkg pkgs-unstable;
|
||||||
|
in if oldPkg.version == newPkg.version
|
||||||
|
then oldPkg
|
||||||
|
else (callPackage newPkg.override);
|
||||||
|
|
||||||
|
in {
|
||||||
|
|
||||||
|
vesktop = backport "vesktop" { };
|
||||||
|
obsidian = backport "obsidian" { electron = final.electron_28; };
|
||||||
|
}
|
16
overlays/default.nix
Normal file
16
overlays/default.nix
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
nixfiles:
|
||||||
|
let
|
||||||
|
inherit (nixfiles.inputs.nixpkgs) lib;
|
||||||
|
# this name is awful. maybe i don't know anything about functional
|
||||||
|
# programming or something, but the naming isn't very self explanatory
|
||||||
|
# - why is it "compose" instead of "combine"
|
||||||
|
# - why is it "extensions" instead of "overlays"
|
||||||
|
inherit (lib) composeManyExtensions;
|
||||||
|
in rec {
|
||||||
|
backports = import ./backports.nix nixfiles;
|
||||||
|
mitigations = import ./mitigations.nix nixfiles;
|
||||||
|
default = composeManyExtensions [
|
||||||
|
backports
|
||||||
|
mitigations
|
||||||
|
];
|
||||||
|
}
|
@ -16,10 +16,10 @@ let
|
|||||||
hash="sha256-oat4TwOorFevUMZdBFgaQHx/UKqGW7CGMoOHVgQxVdM=";
|
hash="sha256-oat4TwOorFevUMZdBFgaQHx/UKqGW7CGMoOHVgQxVdM=";
|
||||||
};
|
};
|
||||||
in recurseIntoAttrs (callPackage "${src}/pkgs/applications/graphics/gimp/plugins" {});
|
in recurseIntoAttrs (callPackage "${src}/pkgs/applications/graphics/gimp/plugins" {});
|
||||||
in (optionalAttrs gap-hold { gimpPlugins = gimpPlugins-gap; }) //
|
in (optionalAttrs gap-hold { gimpPlugins = gimpPlugins-gap; })
|
||||||
# can't optionalAttrs for version checks because it breaks lazy eval and causes infinite recursion
|
# # can't optionalAttrs for version checks because it breaks lazy eval and causes infinite recursion
|
||||||
{
|
# // {
|
||||||
obsidian = let
|
# obsidian = let
|
||||||
pkg = final.callPackage "${nixfiles.inputs.nixpkgs-unstable}/pkgs/applications/misc/obsidian" { electron = final.electron_28; };
|
# pkg = final.callPackage "${nixfiles.inputs.nixpkgs-unstable}/pkgs/applications/misc/obsidian" { electron = final.electron_28; };
|
||||||
in if isNewer "1.4.16" prev.obsidian.version then prev.obsidian else pkg;
|
# in if isNewer "1.4.16" prev.obsidian.version then prev.obsidian else pkg;
|
||||||
}
|
# }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user