Compare commits

..

No commits in common. "33f5a3db37fcbc53ede7bd424e420de0c957d80b" and "d21e38ae5f507d36cc9c390bfc287f31fc941102" have entirely different histories.

5 changed files with 31 additions and 83 deletions

View File

@ -87,10 +87,7 @@
})
# various temporary fixes that automatically revert
self.overlays.mitigations
# auto backports from nixpkgs unstable
self.overlays.backports
(import ./overlays self)
inputs.hyprwm-contrib.overlays.default
inputs.rust-overlay.overlays.default
@ -287,8 +284,6 @@
apps = eachSystem (system: import ./pkgs/apps.nix
{ inherit (self.outputs) packages; inherit system; });
overlays = import ./overlays self;
nixosConfigurations = {
slab = mkSystem {
system = "x86_64-linux";

View File

@ -1,20 +1,9 @@
# Overlays
This directory contains nixpkgs overlays which each serve some specific purpose.
## backports
This overlay defines programs that should be unconditionally backported from
nixpkgs-unstable. Packages backported in this overlay will be built using
inputs from the current system when possible, as to not unnecessarily increase
the closure size. This may result in unexpected breakages, as packages in
nixpkgs-unstable are built and tested against other such packages.
## mitigations
This overlay contains temporary fixes for build failures or other issues,
usually backported from the nixpkgs master branch. Each package defined in this
overlay shall automatically disable itself once a certain condition is met,
such as the upstream package being updated or the nixpkgs modification date
passing a certain time.
# backports
This is a nixpkgs overlay that contains temporary fixes for build failures or
other issues, usually backported from the nixpkgs master branch. Each package
defined in this overlay shall automatically disable itself once a certain
condition is met, such as the upstream package being updated or the nixpkgs
modification date passing a certain time.
This is in place because I am extremely forgetful; I will almost certainly
forget to undo a temporary fix later, so this takes care of it for me.

View File

@ -1,20 +0,0 @@
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; };
}

View File

@ -1,16 +1,25 @@
nixfiles:
nixfiles: final: prev:
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
];
}
inherit (prev) callPackage fetchFromGitHub;
inherit (prev.lib) recurseIntoAttrs optionalAttrs;
isNewer = ref: ver: (builtins.compareVersions ver ref) == 1;
# if you can't do version based just make it time based and deal with it in a
# month if it's not fixed
# 2024-04-10T08:11:11
gap-hold = (nixfiles.inputs.nixpkgs-unstable.lastModified <= 1712751071);
gimpPlugins-gap = let
src = fetchFromGitHub {
owner = "Scrumplex";
repo = "nixpkgs";
rev = "cca25fd345f2c48de66ff0a950f4ec3f63e0420f";
hash="sha256-oat4TwOorFevUMZdBFgaQHx/UKqGW7CGMoOHVgQxVdM=";
};
in recurseIntoAttrs (callPackage "${src}/pkgs/applications/graphics/gimp/plugins" {});
in (optionalAttrs gap-hold { gimpPlugins = gimpPlugins-gap; }) //
# can't optionalAttrs for version checks because it breaks lazy eval and causes infinite recursion
{
obsidian = let
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;
}

View File

@ -1,25 +0,0 @@
nixfiles: final: prev:
let
inherit (prev) callPackage fetchFromGitHub;
inherit (prev.lib) recurseIntoAttrs optionalAttrs;
isNewer = ref: ver: (builtins.compareVersions ver ref) == 1;
# if you can't do version based just make it time based and deal with it in a
# month if it's not fixed
# 2024-04-10T08:11:11
gap-hold = (nixfiles.inputs.nixpkgs-unstable.lastModified <= 1712751071);
gimpPlugins-gap = let
src = fetchFromGitHub {
owner = "Scrumplex";
repo = "nixpkgs";
rev = "cca25fd345f2c48de66ff0a950f4ec3f63e0420f";
hash="sha256-oat4TwOorFevUMZdBFgaQHx/UKqGW7CGMoOHVgQxVdM=";
};
in recurseIntoAttrs (callPackage "${src}/pkgs/applications/graphics/gimp/plugins" {});
in (optionalAttrs gap-hold { gimpPlugins = gimpPlugins-gap; })
# # can't optionalAttrs for version checks because it breaks lazy eval and causes infinite recursion
# // {
# obsidian = let
# 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;
# }