mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 18:05:37 +00:00
allow specific unfree
This commit is contained in:
parent
f4d5df0071
commit
3b38f0301a
@ -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; };
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
|
||||
config = lib.mkIf config.gui.enable {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
unfreePackages = [ "1password" "_1password-gui" ];
|
||||
home-manager.users.${config.user} = {
|
||||
home.packages = with pkgs; [ _1password-gui ];
|
||||
};
|
||||
|
@ -1,8 +1,8 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
|
||||
config = lib.mkIf config.gui.enable {
|
||||
unfreePackages = [ "discord" ];
|
||||
home-manager.users.${config.user} = {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
home.packages = with pkgs; [ discord ];
|
||||
};
|
||||
};
|
||||
|
@ -2,6 +2,14 @@
|
||||
|
||||
{
|
||||
config = lib.mkIf config.gui.enable {
|
||||
|
||||
# nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
# builtins.elem (lib.getName pkg) [ "onepassword-password-manager" ];
|
||||
nixpkgs.config.allowlistedLicenses = [
|
||||
pkgs.nur.repos.rycee.firefox-addons.onepassword-password-manager.meta.license
|
||||
pkgs.nur.repos.rycee.firefox-addons.okta-browser-plugin.meta.license
|
||||
];
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
|
||||
programs.firefox = {
|
||||
|
@ -57,6 +57,12 @@ key("n", "<Leader>gb", ":Telescope git_branches<CR>")
|
||||
key("n", "<Leader>gs", ":Telescope git_status<CR>")
|
||||
key("n", "<C-p>", "<Cmd>lua choose_project()<CR>")
|
||||
|
||||
-- Buffer tabs (tmux interferes)
|
||||
-- key("n", "<C-L>", "gt")
|
||||
-- key("i", "<C-L>", "<Esc>gt")
|
||||
-- key("n", "<C-H>", "gT")
|
||||
-- key("i", "<C-H>", "<Esc>gT")
|
||||
|
||||
-- LSP
|
||||
key("n", "gd", "<Cmd>lua vim.lsp.buf.definition()<CR>", { silent = true })
|
||||
key("n", "gT", "<Cmd>lua vim.lsp.buf.type_definition()<CR>", { silent = true })
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
config = lib.mkIf config.gaming.leagueoflegends {
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# League of Legends anti-cheat requirement
|
||||
boot.kernel.sysctl = { "abi.vsyscall32" = 0; };
|
||||
|
||||
|
@ -42,12 +42,10 @@ in {
|
||||
epic-games = {
|
||||
body = ''
|
||||
set game (legendary list 2>/dev/null \
|
||||
| tail -n +3 \
|
||||
| head -n -2 \
|
||||
| awk '/^ \* / { print $0; }' \
|
||||
| sed -e 's/ (.*)$//' -e 's/ \* //' \
|
||||
| awk '!/^ / { print $0; }' \
|
||||
| fzf)
|
||||
and legendary launch "$game" 2>/dev/null
|
||||
and legendary launch "$game" &> /dev/null
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
config = lib.mkIf config.gaming.steam {
|
||||
hardware.steam-hardware.enable = true;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
unfreePackages = [ "steam" "steam-original" "steamcmd" ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
||||
steam
|
||||
|
Loading…
Reference in New Issue
Block a user