whitelist for nonfree packages

This commit is contained in:
Vinzenz Schroeter 2023-10-02 18:14:05 +02:00
parent 61419b3559
commit 80b5a14c5e
3 changed files with 29 additions and 3 deletions

View file

@ -38,6 +38,7 @@ in {
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
#jack.enable = true;
};
programs = {
@ -90,6 +91,14 @@ in {
"electron-12.2.3"
];
my.allowUnfreePackages = [
"insync"
"insync-pkg"
"rider"
"pycharm-professional"
];
fonts = {
fontconfig.defaultFonts.monospace = ["FiraCode Nerd Font"];
fonts = with pkgs; [

View file

@ -42,5 +42,11 @@ in {
dedicatedServer.openFirewall = true;
};
};
my.allowUnfreePackages = [
"steam"
"steam-original"
"steam-run"
];
};
}

View file

@ -1,16 +1,27 @@
{config, ...}: let
{
config,
lib,
...
}: let
unstable-commit-sha = "f5892ddac112a1e9b3612c39af1b72987ee5783a";
in {
options.my.allowUnfreePackages = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [];
example = ["steam"];
};
config = {
nixpkgs.config = {
allowUnfree = true;
# make nixos-unstable availiable as 'pkgs.unstable'
packageOverrides = pkgs: {
unstable = import (fetchTarball "https://github.com/nixos/nixpkgs/tarball/${unstable-commit-sha}") {
config = config.nixpkgs.config;
};
};
# https://github.com/NixOS/nixpkgs/issues/197325#issuecomment-1579420085
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.my.allowUnfreePackages;
};
system = {