Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): routine update #147

Merged
merged 20 commits into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@ fi

use flake

# FIXME: workaround for https://github.com/NixOS/nixpkgs/issues/358795
unset DEVELOPER_DIR

# list anything that requires re-generating .pre-commit-config.yaml
watch_file nix/style.nix
1 change: 0 additions & 1 deletion files/.config/nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ vim.api.nvim_create_autocmd("BufReadPost", {
vim.opt.colorcolumn = "81"
vim.opt.foldenable = false
vim.opt.inccommand = "split"
vim.opt.lazyredraw = true
vim.opt.mouse = "a"
vim.opt.number = true
vim.opt.showmatch = true
Expand Down
2 changes: 1 addition & 1 deletion files/.local/opt/tldr
Submodule tldr updated 8446 files
48 changes: 24 additions & 24 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions nix/home/modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
./emacs.nix
./firefox.nix
./git
./iterm2.nix
./linkapps.nix
./manpages.nix
./vim.nix
Expand Down
124 changes: 124 additions & 0 deletions nix/home/modules/iterm2.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
lib,
config,
pkgs,
...
}:

let
cfg = config.dotfiles.iterm2;
json = pkgs.formats.json { };

mkNullableOption =
args:
lib.mkOption (
args
// {
type = lib.types.nullOr args.type;
default = null;
}
);

mkNullableEnableOption =
name:
lib.mkOption {
type = with lib.types; nullOr bool;
default = null;
example = true;
description = "Whether to enable ${name}.";
};
in
{
options.dotfiles.iterm2 = {
settings = lib.mkOption {
description = "iTerm2 preferences.";
default = { };
type = lib.types.submodule {
freeformType = with lib.types; attrsOf anything;
options = {
AddNewTabAtEndOfTabs = mkNullableEnableOption "placement of new tabs at the end of the tab bar";

AlternateMouseScroll = mkNullableEnableOption "arrow keys when scrolling in alternate screen mode";

CopySelection = mkNullableEnableOption "copy to clipboard upon selecting text";

OpenTmuxWindowsIn = mkNullableOption {
type = lib.types.int;
example = 2;
description = ''
Configures how to restore tmux windows when attaching to a session.

**Possible Values**

`0`
: Native windows

`1`
: Native tabs in a new window

`2`
: Tabs in the attaching window
'';
};

ExperimentalKeyHandling = mkNullableEnableOption "experimental key handling for AquaSKK compatibility";
};
};
};

profiles = lib.mkOption {
description = ''
Defines iTerm2 Dynamic Profiles.

See <https://iterm2.com/documentation-dynamic-profiles.html> for details.
'';
default = { };
type = lib.types.attrsOf (
lib.types.submodule (
{ name, ... }:
{
freeformType = json.type;
options = {
Name = lib.mkOption {
type = lib.types.str;
default = name;
description = "Name of the profile.";
};
Description = lib.mkOption {
type = lib.types.str;
description = "Description of the profile.";
default = "";
};
Guid = lib.mkOption {
type = lib.types.str;
description = ''
Globally unique identifier that can be used to track changes to the profile. No
two profiles should have the same guid.
'';
};
"Special Font Config" = lib.mkOption {
type = lib.types.submodule {
freeformType = json.type;
};
default = { };
description = ''
Rules that maps a range of codes from another font into the terminal, possibly at
a different range. This option works when the non-ASCII font option is enabled.
'';
apply = builtins.toJSON;
};
};
}
)
);
};
};

config = {
home.file."Library/Application Support/iTerm2/DynamicProfiles/home-manager.plist".text =
builtins.toJSON
{ Profiles = lib.attrValues cfg.profiles; };

targets.darwin.defaults."com.googlecode.iterm2" = cfg.settings;
};
}
6 changes: 6 additions & 0 deletions nix/home/news.nix
Original file line number Diff line number Diff line change
Expand Up @@ -293,5 +293,11 @@
A new module is available: 'dotfiles.aquaskk'
'';
}
{
time = "2024-11-21T19:00:00+00:00";
message = ''
A new module is available: 'dotfiles.iterm2'
'';
}
];
}
2 changes: 1 addition & 1 deletion nix/home/profiles/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
./desktop.nix
./development.nix
./fonts.nix
./macos.nix
./macos
./neovim.nix
./web.nix
];
Expand Down
1 change: 0 additions & 1 deletion nix/home/profiles/essential.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ in
jq
lsof
magic-wormhole
neofetch
nkf
ranger
tig
Expand Down
2 changes: 1 addition & 1 deletion nix/home/profiles/fonts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ in
home.packages = with pkgs; [
fira-code
xkcd-font
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
nerd-fonts.symbols-only
];
};
}
Loading