allow specific unfree

This commit is contained in:
Noah Masur
2022-06-04 21:08:09 -04:00
parent f4d5df0071
commit 3b38f0301a
8 changed files with 29 additions and 10 deletions

View File

@ -21,6 +21,11 @@
type = types.str;
description = "Link to dotfiles repository.";
};
unfreePackages = mkOption {
type = types.listOf types.str;
description = "List of unfree packages to allow.";
default = [ ];
};
};
config = {
@ -35,9 +40,13 @@
home-manager.useGlobalPkgs = true;
# Install packages to /etc/profiles instead of ~/.nix-profile, useful when
# using multiple profiles
# using multiple profiles for one user
home-manager.useUserPackages = true;
# Allow specified unfree packages (identified elsewhere)
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) config.unfreePackages;
# Set a variable for dotfiles repo, not necessary but convenient
home-manager.users.${config.user} = {
home.sessionVariables = { DOTS = config.dotfilesPath; };