1

Flake: Add nixpkgs-stable input, put the overlays in the correct place and add jetbrains.rider overlay

Jetbrains apps are currently broken on unstable because of a
jetbrains.jdk buildfailure
This commit is contained in:
2025-07-22 18:59:16 +02:00
parent 59075d1619
commit 1418e62598
5 changed files with 87 additions and 57 deletions

17
flake.lock generated
View File

@ -718,6 +718,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-stable": {
"locked": {
"lastModified": 1753115646,
"narHash": "sha256-yLuz5cz5Z+sn8DRAfNkrd2Z1cV6DaYO9JMrEz4KZo/c=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "92c2e04a475523e723c67ef872d8037379073681",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1752950548, "lastModified": 1752950548,
@ -889,6 +905,7 @@
"nix-alien": "nix-alien", "nix-alien": "nix-alien",
"nix-flatpak": "nix-flatpak", "nix-flatpak": "nix-flatpak",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable",
"nixvim": "nixvim", "nixvim": "nixvim",
"nps": "nps", "nps": "nps",
"nur": "nur", "nur": "nur",

View File

@ -12,6 +12,9 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
hardware.url = "github:nixos/nixos-hardware"; hardware.url = "github:nixos/nixos-hardware";
# NOTE: Update this after May and November
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.05";
# Home Manager # Home Manager
home-manager.url = "github:nix-community/home-manager"; home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
@ -52,7 +55,7 @@
hypr-dynamic-cursors.inputs.nixpkgs.follows = "nixpkgs"; hypr-dynamic-cursors.inputs.nixpkgs.follows = "nixpkgs";
hypr-dynamic-cursors.inputs.hyprland.follows = "hyprland"; hypr-dynamic-cursors.inputs.hyprland.follows = "hyprland";
hyprspace.url = "github:KZDKM/Hyprspace"; hyprspace.url = "github:KZDKM/Hyprspace";
hyprspace.inputs.nixpkgs.follows = "nixpkgs"; # hyprspace.inputs.nixpkgs.follows = "nixpkgs";
hyprspace.inputs.hyprland.follows = "hyprland"; hyprspace.inputs.hyprland.follows = "hyprland";
# NeoVim <3 # NeoVim <3
@ -111,41 +114,24 @@
# firefox = prev.firefox.override { ... }; # firefox = prev.firefox.override { ... };
# myBrowser = final.firefox; # myBrowser = final.firefox;
# } # }
overlays = [ overlays = let
# Maintain additional stable pkgs.
# This is supposed to provide a backup for packages in case they
# stop building on the unstable branch.
# It should otherwise not be mixed with this configuration,
# so don't even pass it to the modules.
pkgs-stable = import inputs.nixpkgs-stable {
inherit system;
config.allowUnfree = true;
config.allowUnfreePredicate = pkg: true;
};
in [
inputs.devshell.overlays.default inputs.devshell.overlays.default
inputs.nur.overlays.default inputs.nur.overlays.default
# inputs.emacs-overlay.overlay # inputs.emacs-overlay.overlay
# Overriding specific packages from a different nixpkgs (e.g. a pull request) # All my own overlays (derivations + modifications)
# can be done like this. Note that this creates an additional nixpkgs instance. (import ./overlays {inherit inputs nixpkgs pkgs-stable;})
# https://github.com/NixOS/nixpkgs/issues/418451
# (final: prev: {
# unityhub_pinned_3_13 = import inputs.unityhub-pinned {
# config.allowUnfree = true;
# localSystem = {inherit (prev) system;};
# };
# })
# TODO: Remove this after 0.15.1 hit nixpkgs
(final: prev: {
neovide = prev.neovide.overrideAttrs (finalAttrs: prevAttrs: {
version = "0.15.1";
src = prev.fetchFromGitHub {
owner = "neovide";
repo = "neovide";
tag = finalAttrs.version;
hash = "sha256-2iV3g6tcCkMF7sFG/GZDz3czPZNIDi6YLfrVzYO9jYI=";
};
cargoHash = "sha256-YlHAcUCRk6ROg5yXIumHfsiR/2TrsSzbuXz/IQK7sEo=";
cargoDeps = prev.rustPlatform.fetchCargoVendor {
inherit (finalAttrs) pname src version;
hash = finalAttrs.cargoHash;
};
});
})
# All my own overlays
(import ./overlays {inherit nixpkgs inputs;})
]; ];
}; };

View File

@ -91,8 +91,7 @@
# Add any extra libraries you want accessible to Rider here # Add any extra libraries you want accessible to Rider here
]; ];
# TODO: Broken, jetbrains.jdk doesn't build (see nixpkgs #425328) rider-unity = pkgs.jetbrains.rider.overrideAttrs (attrs: {
unity-rider = pkgs.jetbrains.rider.overrideAttrs (attrs: {
postInstall = postInstall =
'' ''
# Wrap rider with extra tools and libraries # Wrap rider with extra tools and libraries
@ -115,21 +114,22 @@
}); });
in { in {
packages = with pkgs; [ packages = with pkgs; [
# quartus-prime-lite # Intel FPGA design software # Intel FPGA design software
# quartus-prime-lite
# Don't want heavy IDE's on the laptop
# jetbrains.clion # jetbrains.clion
# jetbrains.rust-rover # jetbrains.rust-rover
# jetbrains.pycharm-professional # jetbrains.pycharm-professional
# jetbrains.idea-ultimate # jetbrains.idea-ultimate
# jetbrains.webstorm # jetbrains.webstorm
# jetbrains.rider
# Unity Stuff # Unity Stuff
# TODO: Unity module # TODO: Unity module
# unityhub # TODO: Wait for https://nixpk.gs/pr-tracker.html?pr=422785 # unityhub # TODO: Wait for https://nixpk.gs/pr-tracker.html?pr=422785
# unity-rider rider-unity
# dotnetCore dotnetCore
# mono mono
blender blender
godot_4 godot_4
@ -144,19 +144,20 @@
file = lib.mkMerge [ file = lib.mkMerge [
{ {
# ".local/share/applications/jetbrains-rider.desktop".source = let ".local/share/applications/jetbrains-rider.desktop".source = let
# desktopFile = pkgs.makeDesktopItem { desktopFile = pkgs.makeDesktopItem {
# name = "jetbrains-rider"; name = "jetbrains-rider";
# desktopName = "Rider"; desktopName = "Rider";
# exec = "\"${unity-rider}/bin/rider\""; exec = "\"${rider-unity}/bin/rider\"";
# icon = "rider"; icon = "rider";
# type = "Application"; type = "Application";
# # Don't show desktop icon in search or run launcher # Don't show desktop icon in search or run launcher
# extraConfig.NoDisplay = "true"; extraConfig.NoDisplay = "true";
# }; };
# in "${desktopFile}/share/applications/jetbrains-rider.desktop"; in "${desktopFile}/share/applications/jetbrains-rider.desktop";
".var/app/com.valvesoftware.Steam/config/MangoHud/MangoHud.conf".source = ../../../config/mangohud/MangoHud.conf; ".var/app/com.valvesoftware.Steam/config/MangoHud/MangoHud.conf".source =
../../../config/mangohud/MangoHud.conf;
} }
(lib.optionalAttrs (mylib.modules.contains config.home.packages pkgs.makemkv) { (lib.optionalAttrs (mylib.modules.contains config.home.packages pkgs.makemkv) {
".MakeMKV/settings.conf".source = ".MakeMKV/settings.conf".source =

View File

@ -248,7 +248,7 @@
# rotate - rotate the cursor based on movement direction # rotate - rotate the cursor based on movement direction
# stretch - stretch the cursor shape based on direction and velocity # stretch - stretch the cursor shape based on direction and velocity
# none - do not change the cursors behaviour # none - do not change the cursors behaviour
mode = "tilt"; mode = "rotate";
# minimum angle difference in degrees after which the shape is changed # minimum angle difference in degrees after which the shape is changed
# smaller values are smoother, but more expensive for hw cursors # smaller values are smoother, but more expensive for hw cursors

View File

@ -1,6 +1,7 @@
{ {
inputs, inputs,
nixpkgs, nixpkgs,
pkgs-stable,
... ...
}: let }: let
# Taken from https://github.com/Misterio77/nix-config/blob/main/overlay/default.nix # Taken from https://github.com/Misterio77/nix-config/blob/main/overlay/default.nix
@ -11,14 +12,39 @@
pkgs = final; pkgs = final;
}; };
modifications = final: prev: rec { modifications = final: prev: {
# Only kept as an example, has nothing to do with current dconf-editor-wrapped derivation # Only kept as an example, has nothing to do with current dconf-editor-wrapped derivation
# dconf-editor-wrapped = import ./dconf-editor.nix { inherit final prev; }; # dconf-editor-wrapped = import ./dconf-editor.nix { inherit final prev; };
# Use dconf-editor.nix: { final, prev }: final.<package>.overrideAttrs (oldAttrs: { ... }) or sth similar # Use dconf-editor.nix: { final, prev }: final.<package>.overrideAttrs (oldAttrs: { ... }) or sth similar
# Overriding specific packages from a different nixpkgs (e.g. a pull request)
# can be done like this. Note that this creates an additional nixpkgs instance.
# https://github.com/NixOS/nixpkgs/issues/418451
# unityhub_pinned_3_13 =
# (import inputs.unityhub-pinned {
# config.allowUnfree = true;
# localSystem = {inherit (prev) system;};
# }).unityhub;
# TODO: Remove this after 0.15.1 hits nixpkgs
neovide = prev.neovide.overrideAttrs (finalAttrs: prevAttrs: {
version = "0.15.1";
src = prev.fetchFromGitHub {
owner = "neovide";
repo = "neovide";
tag = finalAttrs.version;
hash = "sha256-2iV3g6tcCkMF7sFG/GZDz3czPZNIDi6YLfrVzYO9jYI=";
};
cargoHash = "sha256-YlHAcUCRk6ROg5yXIumHfsiR/2TrsSzbuXz/IQK7sEo=";
cargoDeps = prev.rustPlatform.fetchCargoVendor {
inherit (finalAttrs) pname src version;
hash = finalAttrs.cargoHash;
};
});
# TODO: Remove this after jetbrains.jdk builds again (nixpkgs issue 425328)
jetbrains.rider = pkgs-stable.jetbrains.rider;
}; };
in in
# TODO: I have absolutely no clue what happens here lol # Composes a list of overlays and returns a single overlay function that combines them.
# Basically we need some sort of list of all overlays that can be imported from the flake
# in the overlays = [ ... ] section of the pkgs = import nixpkgs { ... } configuration
# Somehow this library function turns additions/modifications into that
nixpkgs.lib.composeManyExtensions [additions modifications] nixpkgs.lib.composeManyExtensions [additions modifications]