mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-26 16:35:36 +00:00
attempt to use pkgs for unfree predicate
still not working
This commit is contained in:
parent
d4fa322fb1
commit
8ab86428ec
@ -11,7 +11,7 @@
|
||||
|
||||
config = lib.mkIf
|
||||
(config.gui.enable && config._1password.enable && pkgs.stdenv.isLinux) {
|
||||
unfreePackages = [ "1password" "_1password-gui" ];
|
||||
unfreePackages = with pkgs; [ _1password _1password-gui ];
|
||||
home-manager.users.${config.user} = {
|
||||
home.packages = with pkgs; [ _1password-gui ];
|
||||
};
|
||||
|
@ -10,7 +10,7 @@
|
||||
};
|
||||
|
||||
config = lib.mkIf (config.gui.enable && config.discord.enable) {
|
||||
unfreePackages = [ "discord" ];
|
||||
unfreePackages = [ pkgs.discord ];
|
||||
home-manager.users.${config.user} = {
|
||||
home.packages = with pkgs; [ discord ];
|
||||
xdg.configFile."discord/settings.json".text = ''
|
||||
|
@ -13,9 +13,9 @@
|
||||
|
||||
config = lib.mkIf (config.gui.enable && config.firefox.enable) {
|
||||
|
||||
unfreePackages = [
|
||||
(lib.mkIf config._1password.enable "onepassword-password-manager")
|
||||
"okta-browser-plugin"
|
||||
unfreePackages = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
(lib.mkIf config._1password.enable onepassword-password-manager)
|
||||
okta-browser-plugin
|
||||
];
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
|
@ -10,7 +10,7 @@
|
||||
};
|
||||
|
||||
config = lib.mkIf (config.gui.enable && config.obsidian.enable) {
|
||||
unfreePackages = [ "obsidian" ];
|
||||
unfreePackages = [ pkgs.obsidian ];
|
||||
home-manager.users.${config.user} = {
|
||||
home.packages = with pkgs; [ obsidian ];
|
||||
};
|
||||
|
@ -10,7 +10,7 @@
|
||||
};
|
||||
|
||||
config = lib.mkIf (config.gui.enable && config.slack.enable) {
|
||||
unfreePackages = [ "slack" ];
|
||||
unfreePackages = [ pkgs.slack ];
|
||||
home-manager.users.${config.user} = {
|
||||
home.packages = with pkgs; [ slack ];
|
||||
};
|
||||
|
@ -68,7 +68,7 @@
|
||||
description = "Link to dotfiles repository.";
|
||||
};
|
||||
unfreePackages = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
type = lib.types.listOf lib.types.package;
|
||||
description = "List of unfree packages to allow.";
|
||||
default = [ ];
|
||||
};
|
||||
@ -113,8 +113,10 @@
|
||||
|
||||
# Allow specified unfree packages (identified elsewhere)
|
||||
# Retrieves package object based on string name
|
||||
# Idea: https://discourse.nixos.org/t/how-to-use-packages-directly-in-allowunfreepredicate/22455/6
|
||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (lib.getName pkg) config.unfreePackages;
|
||||
builtins.elem (pkg.name or (builtins.parseDrvName pkg.pname).name)
|
||||
(map lib.getName config.unfreePackages);
|
||||
|
||||
# Pin a state version to prevent warnings
|
||||
home-manager.users.${config.user}.home.stateVersion = stateVersion;
|
||||
|
@ -14,7 +14,7 @@ in {
|
||||
|
||||
config = lib.mkIf config.gaming.minecraft-server.enable {
|
||||
|
||||
unfreePackages = [ "minecraft-server" ];
|
||||
unfreePackages = [ pkgs.minecraft-server ];
|
||||
|
||||
services.minecraft-server = {
|
||||
enable = true;
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
config = lib.mkIf (config.gaming.steam.enable && pkgs.stdenv.isLinux) {
|
||||
hardware.steam-hardware.enable = true;
|
||||
unfreePackages = [ "steam" "steam-original" "steamcmd" "steam-run" ];
|
||||
unfreePackages = with pkgs; [ steam steamcmd steam-run ];
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
|
Loading…
Reference in New Issue
Block a user