nix-git/modules/nur-and-unstable.nix

51 lines
1.3 KiB
Nix
Raw Permalink Normal View History

2024-01-01 16:21:47 +01:00
{ config, pkgs, lib, ... }:
2024-11-11 14:06:54 +01:00
let
sources = import ../nix/sources.nix;
in
2023-09-12 12:43:51 +02:00
{
2023-10-24 10:02:30 +02:00
# How NUR (or unstable) can be imported without `niv`.
2023-09-12 12:43:51 +02:00
#nixpkgs.config.packageOverrides = pkgs: {
# nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") {
# inherit pkgs;
# };
#};
nixpkgs.config.packageOverrides = pkgs: {
2023-10-20 14:57:34 +02:00
# Import NUR with niv.
2024-11-11 14:06:54 +01:00
nur = import sources.NUR {
2023-09-12 12:43:51 +02:00
inherit pkgs;
};
2023-10-20 14:57:34 +02:00
# Import unstable with niv.
2024-11-11 14:06:54 +01:00
unstable = import sources.unstable {
2023-10-20 14:57:34 +02:00
inherit pkgs;
2024-01-01 16:21:47 +01:00
# "unstable" `nixpkgs.config` has to be configured here where we import it.
# https://github.com/NixOS/nixpkgs/issues/69347#issuecomment-534573461
config = {
2024-08-13 14:46:55 +02:00
# allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
# # Required for unstable.obsidian (see obsidan.nix)
# "obsidian"
# ];
# permittedInsecurePackages = [
# # Required for unstable.obsidian (see obsidan.nix)
# "electron-25.9.0"
# ];
2024-01-01 16:21:47 +01:00
};
2023-10-20 14:57:34 +02:00
};
2023-09-12 12:43:51 +02:00
};
2024-11-11 14:06:54 +01:00
nixpkgs.overlays = [
# Import rust-overlay with niv.
(import sources.rust-overlay)
];
2023-09-12 12:43:51 +02:00
#environment.systemPackages = with pkgs; [
2023-10-24 10:02:30 +02:00
# # Example NUR usage:
2023-09-12 12:43:51 +02:00
# nur.repos.mic92.hello-nur
2023-10-24 10:02:30 +02:00
# # Example unstable usage:
# unstable.nano
2023-09-12 12:43:51 +02:00
#];
}