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

43 lines
1.2 KiB
Nix
Raw Normal View History

2024-01-01 16:21:47 +01:00
{ config, pkgs, lib, ... }:
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.
2023-09-12 12:43:51 +02:00
nur = import (import ../nix/sources.nix).NUR {
inherit pkgs;
};
2023-10-20 14:57:34 +02:00
# Import unstable with niv.
unstable = import (import ../nix/sources.nix).unstable {
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 = {
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
2024-02-23 12:55:06 +01:00
# Required for unstable.obsidian (see obsidan.nix)
2024-01-01 16:21:47 +01:00
"obsidian"
];
permittedInsecurePackages = [
2024-02-23 12:55:06 +01:00
# Required for unstable.obsidian (see obsidan.nix)
2024-01-01 16:21:47 +01:00
"electron-25.9.0"
];
};
2023-10-20 14:57:34 +02:00
};
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
#];
}