mirror of
https://codeberg.org/privacy1st/nix-git
synced 2024-12-25 02:56:05 +01:00
NixOS 24.05: unfree packages fix
This commit is contained in:
parent
6d57d99da3
commit
4a19d57765
@ -5,6 +5,7 @@
|
||||
./hardware-configuration.nix
|
||||
../../modules/home-manager.nix
|
||||
../../modules/nur-and-unstable.nix
|
||||
../../modules/unfree.nix
|
||||
../../modules/base.nix
|
||||
../../modules/base-bios.nix
|
||||
../../modules/power-management.nix
|
||||
|
@ -6,6 +6,7 @@
|
||||
./host-specific.nix
|
||||
../../modules/home-manager.nix
|
||||
../../modules/nur-and-unstable.nix
|
||||
../../modules/unfree.nix
|
||||
../../modules/base.nix
|
||||
../../modules/base-efi.nix
|
||||
../../modules/headless.nix
|
||||
|
@ -6,6 +6,7 @@
|
||||
./host-specific.nix
|
||||
../../modules/home-manager.nix
|
||||
../../modules/nur-and-unstable.nix
|
||||
../../modules/unfree.nix
|
||||
../../modules/base.nix
|
||||
../../modules/base-efi.nix
|
||||
../../modules/headless.nix
|
||||
|
@ -5,6 +5,7 @@
|
||||
./hardware-configuration.nix
|
||||
../../modules/home-manager.nix
|
||||
../../modules/nur-and-unstable.nix
|
||||
../../modules/unfree.nix
|
||||
../../modules/base.nix
|
||||
../../modules/base-efi.nix
|
||||
../../modules/xdg.nix
|
||||
|
@ -5,6 +5,7 @@
|
||||
./hardware-configuration.nix
|
||||
../../modules/home-manager.nix
|
||||
../../modules/nur-and-unstable.nix
|
||||
../../modules/unfree.nix
|
||||
../../modules/base.nix
|
||||
../../modules/base-efi.nix
|
||||
../../modules/xdg.nix
|
||||
@ -26,7 +27,8 @@
|
||||
../../modules/gnome-base.nix
|
||||
../../modules/gnome-config.nix
|
||||
../../modules/gnome-extensions.nix
|
||||
../../modules/gnome-fractional-scaling.nix
|
||||
# TODO currently broken
|
||||
#../../modules/gnome-fractional-scaling.nix
|
||||
../../modules/fwupd-gnome.nix
|
||||
../../modules/gnome-wallpaper.nix
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
./host-specific.nix
|
||||
../../modules/home-manager.nix
|
||||
../../modules/nur-and-unstable.nix
|
||||
../../modules/unfree.nix
|
||||
../../modules/base.nix
|
||||
../../modules/base-efi.nix
|
||||
../../modules/headless.nix
|
||||
|
@ -11,7 +11,8 @@
|
||||
# Defaults to `config.hardware.enableAllFirmware`.
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
# Allow unfree packages.
|
||||
# Allow **all** unfree packages.
|
||||
# To whitelist individual unfree packages, see ./unfree.nix
|
||||
nixpkgs.config.allowUnfree = false;
|
||||
|
||||
# Enables wireless support via wpa_supplicant.
|
||||
|
@ -20,9 +20,9 @@
|
||||
# https://unknown-horizons.org/ (A 2D realtime strategy simulation with an emphasis on economy and city building.)
|
||||
# https://github.com/mgerdes/Open-Golf
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||
allowUnfree = [
|
||||
"SpaceCadetPinball"
|
||||
"osu-lazer-bin-2023.1114.1"
|
||||
"osu-lazer-bin"
|
||||
"warsow"
|
||||
"assaultcube"
|
||||
"ut2004-demo"
|
||||
|
@ -51,8 +51,8 @@
|
||||
]);
|
||||
|
||||
# Configure keymap in X11.
|
||||
services.xserver = {
|
||||
services.xserver.xkb = {
|
||||
layout = "de";
|
||||
xkbVariant = "nodeadkeys";
|
||||
variant = "nodeadkeys";
|
||||
};
|
||||
}
|
||||
|
@ -43,9 +43,9 @@
|
||||
};
|
||||
|
||||
# Configure keymap in X11.
|
||||
services.xserver = {
|
||||
services.xserver.xkb = {
|
||||
layout = "de";
|
||||
xkbVariant = "nodeadkeys";
|
||||
variant = "nodeadkeys";
|
||||
};
|
||||
|
||||
# Enable Bluetooth support
|
||||
|
@ -83,8 +83,8 @@
|
||||
enable = true;
|
||||
# Sets SSH_AUTH_SOCK environment variable.
|
||||
enableSSHSupport = true;
|
||||
#pinentryFlavor = "curses";
|
||||
pinentryFlavor = "gnome3";
|
||||
#pinentryPackage = pkgs.pinentry-curses;
|
||||
pinentryPackage = pkgs.pinentry-gnome3;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -20,14 +20,14 @@
|
||||
# https://github.com/NixOS/nixpkgs/issues/69347#issuecomment-534573461
|
||||
config = {
|
||||
|
||||
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"
|
||||
];
|
||||
# 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"
|
||||
# ];
|
||||
|
||||
};
|
||||
};
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
# This `config` is only for "stable" `nixpkgs`, not for "unstable".
|
||||
# See nur-and-unstable.nix for how to configure "unstable" `nixpkgs`.
|
||||
# nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||
# "obsidian"
|
||||
# ];
|
||||
allowUnfree = [
|
||||
"obsidian"
|
||||
];
|
||||
|
||||
users.users.yoda = {
|
||||
packages = with pkgs; [
|
||||
unstable.obsidian # Markdown notes
|
||||
obsidian # Markdown notes
|
||||
];
|
||||
};
|
||||
|
||||
|
22
modules/unfree.nix
Normal file
22
modules/unfree.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
# See also: ./nur-and-unstable.nix to allow unfree packages from "unstable".
|
||||
# See also: ./base.nix for unfree firmware.
|
||||
|
||||
# This file adds the ability to whitelist unfree packages in different .nix config files.
|
||||
# Example: Instead of
|
||||
# nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||
# "obsidian"
|
||||
# ];
|
||||
# add the following
|
||||
# allowUnfree = [ "obsidian" ];
|
||||
|
||||
let
|
||||
inherit (builtins) elem;
|
||||
inherit (lib) getName mkOption;
|
||||
inherit (lib.types) listOf str;
|
||||
in
|
||||
{
|
||||
options.allowUnfree = mkOption { type = listOf str; default = [ ]; };
|
||||
config.nixpkgs.config.allowUnfreePredicate = p: elem (getName p) config.allowUnfree;
|
||||
}
|
@ -7,7 +7,7 @@
|
||||
# Alternatively, run Veracrypt with
|
||||
# NIXPKGS_ALLOW_UNFREE=1 nix-shell -p veracrypt
|
||||
# https://nixos.wiki/wiki/Unfree_Software
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||
allowUnfree = [
|
||||
"veracrypt"
|
||||
];
|
||||
|
||||
|
@ -5,10 +5,10 @@
|
||||
"homepage": "https://nur.nix-community.org/",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "f9b13b99b4e7d7f462a5291969bedbcba0b5b7c9",
|
||||
"sha256": "0si2qy8fzysvcb7rj6yihb1b1dwaf9crfyl22vqz3pqwwj1afgyz",
|
||||
"rev": "8511e95dfec45e3c770bd2528f5eb90fc8947e75",
|
||||
"sha256": "1d8rgywwi1x7nj03i18mqa7qp24djyicxl99w611wdxppy9853v9",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/nix-community/NUR/archive/f9b13b99b4e7d7f462a5291969bedbcba0b5b7c9.tar.gz",
|
||||
"url": "https://github.com/nix-community/NUR/archive/8511e95dfec45e3c770bd2528f5eb90fc8947e75.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
},
|
||||
"home-manager": {
|
||||
@ -29,10 +29,10 @@
|
||||
"homepage": null,
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a046c1202e11b62cbede5385ba64908feb7bfac4",
|
||||
"sha256": "10y8ccyv76i9zhd3s8x792g58p5iw16xy3qz4f6gqk0svwlgwr09",
|
||||
"rev": "a781ff33ae258bbcfd4ed6e673860c3e923bf2cc",
|
||||
"sha256": "1s0cb03j3rwgpgnl4jy1bjmx4gh70iin8h1kn84gw0x5lgavscm1",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/a046c1202e11b62cbede5385ba64908feb7bfac4.tar.gz",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/a781ff33ae258bbcfd4ed6e673860c3e923bf2cc.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
},
|
||||
"unstable": {
|
||||
@ -41,10 +41,10 @@
|
||||
"homepage": "",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6794d064edc69918bb0fc0e0eda33ece324be17a",
|
||||
"sha256": "1rfl5c9dj7wlzbk9bg8b99qqqfv7d3ak2yxw459gblja4zn1qv6b",
|
||||
"rev": "154bcb95ad51bc257c2ce4043a725de6ca700ef6",
|
||||
"sha256": "0gv8wgjqldh9nr3lvpjas7sk0ffyahmvfrz5g4wd8l2r15wyk67f",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/6794d064edc69918bb0fc0e0eda33ece324be17a.tar.gz",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/154bcb95ad51bc257c2ce4043a725de6ca700ef6.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user