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 # various temporary fixes that automatically revert
self.overlays.mitigations (import ./overlays self)
# 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
@ -287,8 +284,6 @@
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";

View File

@ -1,20 +1,9 @@
# Overlays # backports
This directory contains nixpkgs overlays which each serve some specific purpose. This is a nixpkgs overlay that contains temporary fixes for build failures or
other issues, usually backported from the nixpkgs master branch. Each package
## backports defined in this overlay shall automatically disable itself once a certain
This overlay defines programs that should be unconditionally backported from condition is met, such as the upstream package being updated or the nixpkgs
nixpkgs-unstable. Packages backported in this overlay will be built using modification date passing a certain time.
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.
This is in place because I am extremely forgetful; I will almost certainly 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. 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 let
inherit (nixfiles.inputs.nixpkgs) lib; inherit (prev) callPackage fetchFromGitHub;
# this name is awful. maybe i don't know anything about functional inherit (prev.lib) recurseIntoAttrs optionalAttrs;
# programming or something, but the naming isn't very self explanatory isNewer = ref: ver: (builtins.compareVersions ver ref) == 1;
# - why is it "compose" instead of "combine"
# - why is it "extensions" instead of "overlays" # if you can't do version based just make it time based and deal with it in a
inherit (lib) composeManyExtensions; # month if it's not fixed
in rec { # 2024-04-10T08:11:11
backports = import ./backports.nix nixfiles; gap-hold = (nixfiles.inputs.nixpkgs-unstable.lastModified <= 1712751071);
mitigations = import ./mitigations.nix nixfiles; gimpPlugins-gap = let
default = composeManyExtensions [ src = fetchFromGitHub {
backports owner = "Scrumplex";
mitigations 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;
# }