refactor: cleanup fixmes
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-12-29 05:40:30 -05:00
parent 628109e47e
commit 82064fec5a
3 changed files with 18 additions and 17 deletions

View file

@ -1,5 +1,9 @@
{...}: let
inherit (builtins) hasAttr isAttrs tryEval;
inputsLib = import ../../inputs/lib.nix;
in {
inherit (inputsLib) recursiveUpdateList;
throws = x: !(tryEval x).success;
hasVersion = x: isAttrs x && hasAttr "version" x;
}

View file

@ -4,28 +4,25 @@ self: {
pkgs,
...
}: let
inherit (lib) attrValues filter findFirst hasAttr isAttrs mkIf optionalString;
inherit (self.inputs) nixd nixpkgs;
inherit (self.lib) hasVersion throws;
inherit (lib) attrValues filter findFirst hasAttr mkIf optionalString;
inherit (config.sops.secrets) access-token;
cfg = config.roles.base;
in {
config = mkIf cfg.enable {
nix = {
# FIXME: infinite recursion if not set
package = let
nixdInput =
findFirst
(x: x.pname == "nix") {}
nixd.packages.x86_64-linux.nixd.buildInputs;
throws = x: !(builtins.tryEval x).success;
hasVersion = x: isAttrs x && hasAttr "version" x;
nixVersions = filter (x: ! throws x && hasVersion x) (attrValues pkgs.nixVersions);
in
findFirst (x: x.version == nixdInput.version) {} nixVersions;
in {
config = mkIf cfg.enable {
nix = {
package = findFirst (x: x.version == nixdInput.version) {} nixVersions;
# Minimize dowloads of indirect nixpkgs flakes
registry.nixpkgs.flake = nixpkgs;

View file

@ -2,7 +2,7 @@ final: prev: {
# FIXME: https://pr-tracker.nelim.org/?pr=357699
nodejs_latest = prev.nodejs_22;
# FIXME: figure out why hplip fails building
# FIXME: https://pr-tracker.nelim.org/?pr=368507
hplip = prev.hplip.overrideAttrs (o: {
env.NIX_CFLAGS_COMPILE = prev.lib.concatStringsSep " " [
"-Wno-error=implicit-int"
@ -13,7 +13,7 @@ final: prev: {
];
});
# FIXME: https://github.com/NixOS/nixpkgs/issues/363965
# FIXME: https://pr-tracker.nelim.org/?pr=368790
triton-llvm = prev.triton-llvm.override {
buildTests = false;
};