refactor: clean up FIXMEs and overlays
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-09-25 15:34:56 -04:00
parent a1e0df37ad
commit 5247f96a41
11 changed files with 33 additions and 22 deletions

View file

@ -12,7 +12,6 @@ inputs @ {
++ (builtins.attrValues { ++ (builtins.attrValues {
inherit inherit
(self.overlays) (self.overlays)
misc
xdg-desktop-portal-kde xdg-desktop-portal-kde
; ;
}); });

View file

@ -68,8 +68,7 @@ defaultSession: {
self.packages.${pkgs.system}.protonhax self.packages.${pkgs.system}.protonhax
# FIXME: Ryujinx ACNH crashes on Vulkan # FIXME: Ryujinx ACNH crashes on Vulkan https://github.com/Ryujinx/Ryujinx/issues/6708
# https://github.com/Ryujinx/Ryujinx/issues/6708
pkgs.ryujinx pkgs.ryujinx
]; ];
}; };

View file

@ -84,4 +84,14 @@
environment.etc."spotifyd/credentials.json" = { environment.etc."spotifyd/credentials.json" = {
source = config.sops.secrets.spotifyd.path; source = config.sops.secrets.spotifyd.path;
}; };
nixpkgs.overlays = [
(final: prev: {
# FIXME: remove this if https://github.com/NixOS/nixpkgs/pull/342913 is merged
spotifyd = prev.spotifyd.override {
withMpris = false;
withKeyring = false;
};
})
];
} }

View file

@ -6,6 +6,16 @@ in {
# In case tailscale is down # In case tailscale is down
boot.kernel.sysctl."net.ipv4.ip_nonlocal_bind" = 1; boot.kernel.sysctl."net.ipv4.ip_nonlocal_bind" = 1;
nixpkgs.overlays = [
# We can get rid of this once full CUDA support works
(final: prev: {
ctranslate2 = prev.ctranslate2.override {
withCUDA = true;
withCuDNN = true;
};
})
];
services = { services = {
# Speech-to-Text # Speech-to-Text
wyoming.faster-whisper.servers."en" = { wyoming.faster-whisper.servers."en" = {

View file

@ -56,8 +56,7 @@ let
repo = "nixos-pcsd"; repo = "nixos-pcsd";
}; };
# FIXME: use nixpkgs once this reaches unstable # FIXME: use nixpkgs once this reaches unstable https://pr-tracker.nelim.org/?pr=340054
# https://github.com/NixOS/nixpkgs/pull/340054
headscale = mkDep { headscale = mkDep {
owner = "juanfont"; owner = "juanfont";
repo = "headscale"; repo = "headscale";

View file

@ -18,4 +18,4 @@ in
{inherit lib mkVersion capitalise;} {inherit lib mkVersion capitalise;}
// (import ./inputs.nix lib lock) // (import ./inputs.nix lib lock)
// optionalAttrs (inputs != {}) (import ./flake-lib.nix inputs) // optionalAttrs (inputs != {}) (import ./flake-lib.nix inputs)
// optionalAttrs (pkgs != {}) (import ./pkgs.nix pkgs mkVersion capitalise self) // optionalAttrs (pkgs != {}) (import ./pkgs.nix {inherit pkgs mkVersion capitalise self;})

View file

@ -13,6 +13,7 @@ inputs: rec {
}; };
}; };
# Enable use of `nixpkgs.overlays` on both NixOS and NixOnDroid
allowModularOverrides = { allowModularOverrides = {
cudaSupport ? false, cudaSupport ? false,
system, system,
@ -77,6 +78,7 @@ inputs: rec {
}; };
config.environment.packages = config.environment.systemPackages; config.environment.packages = config.environment.systemPackages;
# This disables the assertion that fails because of nixpkgs.overlays # This disables the assertion that fails because of nixpkgs.overlays
config._module.args.isFlake = mkForce false; config._module.args.isFlake = mkForce false;
}) })

View file

@ -1,4 +1,9 @@
pkgs: mkVersion: capitalise: self: { {
capitalise,
mkVersion,
pkgs,
self,
}: {
buildPlugin = pname: src: buildPlugin = pname: src:
pkgs.vimUtils.buildVimPlugin { pkgs.vimUtils.buildVimPlugin {
inherit pname src; inherit pname src;

View file

@ -72,7 +72,7 @@
]; ];
}; };
binto = mkNixOS { binto = mkNixOS {
# FIXME: https://github.com/NixOS/nixpkgs/issues/338315 # FIXME: https://pr-tracker.nelim.org/?pr=339619
# cudaSupport = true; # cudaSupport = true;
extraModules = [./devices/binto]; extraModules = [./devices/binto];
}; };
@ -81,7 +81,7 @@
# NAS # NAS
nos = mkNixOS { nos = mkNixOS {
# FIXME: https://github.com/NixOS/nixpkgs/issues/338315 # FIXME: https://pr-tracker.nelim.org/?pr=339619
# cudaSupport = true; # cudaSupport = true;
extraModules = [ extraModules = [
./devices/nos ./devices/nos

View file

@ -1,4 +1,3 @@
{...}: { {...}: {
misc = import ./misc;
xdg-desktop-portal-kde = import ./xdg-desktop-portal-kde; xdg-desktop-portal-kde = import ./xdg-desktop-portal-kde;
} }

View file

@ -1,12 +0,0 @@
final: prev: {
ctranslate2 = prev.ctranslate2.override {
withCUDA = true;
withCuDNN = true;
};
# FIXME: remove this if https://github.com/NixOS/nixpkgs/pull/342913 is merged
spotifyd = prev.spotifyd.override {
withMpris = false;
withKeyring = false;
};
}