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 = {
|
options = {
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
my.allowUnfree.names = lib.mkOption {
|
||||||
auto-optimise-store = true;
|
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;
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
git
|
||||||
|
curl
|
||||||
|
htop
|
||||||
|
tmux
|
||||||
|
neovim
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfreePredicate =
|
||||||
|
pkg: builtins.elem (lib.getName pkg) cfg.names;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
git
|
|
||||||
curl
|
|
||||||
htop
|
|
||||||
tmux
|
|
||||||
neovim
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{ config, pkgs, myUser, release, lib, ... }:
|
{ config, pkgs, myUser, release, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
my.allowUnfree.names = lib.mkAfter [
|
||||||
"steam"
|
"steam"
|
||||||
"steam-unwrapped"
|
"steam-unwrapped"
|
||||||
];
|
];
|
||||||
|
|||||||
@ -12,8 +12,9 @@
|
|||||||
|
|
||||||
# Nvidia
|
# Nvidia
|
||||||
|
|
||||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
my.allowUnfree.names = lib.mkAfter [
|
||||||
"nvidia-x11"
|
"nvidia-x11"
|
||||||
|
"nvidia-settings"
|
||||||
];
|
];
|
||||||
hardware.graphics.enable = true;
|
hardware.graphics.enable = true;
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user