modular unfree whitelist
This commit is contained in:
parent
72a18f3661
commit
d496f8a7de
@ -1,18 +1,33 @@
|
||||
{ config, pkgs, mainDisk, ... }:
|
||||
{ config, pkgs, mainDisk, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.my.allowUnfree;
|
||||
in
|
||||
{
|
||||
nix.settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
auto-optimise-store = true;
|
||||
options = {
|
||||
my.allowUnfree.names = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [];
|
||||
description = "Package names allowed by allowUnfreePredicate";
|
||||
};
|
||||
};
|
||||
config = {
|
||||
nix.settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
|
||||
programs.zsh.enable = true;
|
||||
programs.zsh.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
curl
|
||||
htop
|
||||
tmux
|
||||
neovim
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
curl
|
||||
htop
|
||||
tmux
|
||||
neovim
|
||||
];
|
||||
nixpkgs.config.allowUnfreePredicate =
|
||||
pkg: builtins.elem (lib.getName pkg) cfg.names;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{ config, pkgs, myUser, release, lib, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||
my.allowUnfree.names = lib.mkAfter [
|
||||
"steam"
|
||||
"steam-unwrapped"
|
||||
];
|
||||
|
||||
@ -12,8 +12,9 @@
|
||||
|
||||
# Nvidia
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||
my.allowUnfree.names = lib.mkAfter [
|
||||
"nvidia-x11"
|
||||
"nvidia-settings"
|
||||
];
|
||||
hardware.graphics.enable = true;
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user