refactor: cleanup fixmes
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
628109e47e
commit
82064fec5a
3 changed files with 18 additions and 17 deletions
|
@ -1,5 +1,9 @@
|
||||||
{...}: let
|
{...}: let
|
||||||
|
inherit (builtins) hasAttr isAttrs tryEval;
|
||||||
inputsLib = import ../../inputs/lib.nix;
|
inputsLib = import ../../inputs/lib.nix;
|
||||||
in {
|
in {
|
||||||
inherit (inputsLib) recursiveUpdateList;
|
inherit (inputsLib) recursiveUpdateList;
|
||||||
|
|
||||||
|
throws = x: !(tryEval x).success;
|
||||||
|
hasVersion = x: isAttrs x && hasAttr "version" x;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,28 +4,25 @@ self: {
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) attrValues filter findFirst hasAttr isAttrs mkIf optionalString;
|
|
||||||
|
|
||||||
inherit (self.inputs) nixd nixpkgs;
|
inherit (self.inputs) nixd nixpkgs;
|
||||||
|
inherit (self.lib) hasVersion throws;
|
||||||
|
|
||||||
|
inherit (lib) attrValues filter findFirst hasAttr mkIf optionalString;
|
||||||
|
|
||||||
inherit (config.sops.secrets) access-token;
|
inherit (config.sops.secrets) access-token;
|
||||||
|
|
||||||
cfg = config.roles.base;
|
cfg = config.roles.base;
|
||||||
in {
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
nix = {
|
|
||||||
# FIXME: infinite recursion if not set
|
|
||||||
package = let
|
|
||||||
nixdInput =
|
nixdInput =
|
||||||
findFirst
|
findFirst
|
||||||
(x: x.pname == "nix") {}
|
(x: x.pname == "nix") {}
|
||||||
nixd.packages.x86_64-linux.nixd.buildInputs;
|
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);
|
nixVersions = filter (x: ! throws x && hasVersion x) (attrValues pkgs.nixVersions);
|
||||||
in
|
in {
|
||||||
findFirst (x: x.version == nixdInput.version) {} nixVersions;
|
config = mkIf cfg.enable {
|
||||||
|
nix = {
|
||||||
|
package = findFirst (x: x.version == nixdInput.version) {} nixVersions;
|
||||||
|
|
||||||
# Minimize dowloads of indirect nixpkgs flakes
|
# Minimize dowloads of indirect nixpkgs flakes
|
||||||
registry.nixpkgs.flake = nixpkgs;
|
registry.nixpkgs.flake = nixpkgs;
|
||||||
|
|
|
@ -2,7 +2,7 @@ final: prev: {
|
||||||
# FIXME: https://pr-tracker.nelim.org/?pr=357699
|
# FIXME: https://pr-tracker.nelim.org/?pr=357699
|
||||||
nodejs_latest = prev.nodejs_22;
|
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: {
|
hplip = prev.hplip.overrideAttrs (o: {
|
||||||
env.NIX_CFLAGS_COMPILE = prev.lib.concatStringsSep " " [
|
env.NIX_CFLAGS_COMPILE = prev.lib.concatStringsSep " " [
|
||||||
"-Wno-error=implicit-int"
|
"-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 {
|
triton-llvm = prev.triton-llvm.override {
|
||||||
buildTests = false;
|
buildTests = false;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue