Initial ghostty module

This commit is contained in:
Erwin Boskma 2024-12-13 11:12:16 +01:00
parent e529129153
commit a742bdc12a
Signed by: erwin
SSH key fingerprint: SHA256:3F6Cm6I3erRqlBwEghZWAQl6eS5WrGTX1Vs/Evec1lQ
6 changed files with 133 additions and 4 deletions

View file

@ -162,7 +162,7 @@
flake = { flake = {
lib = import ./lib inputs; lib = import ./lib inputs;
overlays.default = import ./overlays; overlays.default = import ./overlays inputs;
nixosModules = builtins.listToAttrs ( nixosModules = builtins.listToAttrs (
map (x: { map (x: {

View file

@ -0,0 +1,33 @@
{
pkgs,
config,
lib,
...
}:
let
cfg = config.eboskma.programs.ghostty;
iniFormat = pkgs.formats.iniWithGlobalSection { listsAsDuplicateKeys = true; };
in
{
options.eboskma.programs.ghostty = {
enable = lib.mkEnableOption "ghostty";
package = lib.mkPackageOption pkgs "ghostty" { };
settings = lib.mkOption {
description = "Ghostty config.";
type = lib.types.submodule {
freeformType = iniFormat.type;
};
default = { };
};
};
config = lib.mkIf cfg.enable {
home.packages = [ cfg.package ];
xdg.configFile.ghostty-config = {
target = "ghostty/config";
source = iniFormat.generate "ghostty-config" { globalSection = cfg.settings; };
};
};
}

View file

@ -170,7 +170,7 @@ in
' '
''; '';
when = "jj root"; when = "jj root";
symbol = "jj"; symbol = "jj ";
}; };
jjstate = { jjstate = {

View file

@ -119,6 +119,20 @@
device = "/dev/disk/by-label/yocto"; device = "/dev/disk/by-label/yocto";
fsType = "ext4"; fsType = "ext4";
}; };
"/mnt/horus/Public" = {
device = "//horusnas1/Horusdata/Public";
fsType = "cifs";
options =
let
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
in
[
"${automount_opts},credentials=/etc/nixos/smb-secrets"
"uid=1000"
"gid=500"
];
};
}; };
swapDevices = [ { device = "/dev/disk/by-label/swap"; } ]; swapDevices = [ { device = "/dev/disk/by-label/swap"; } ];

View file

@ -1,4 +1,4 @@
_final: prev: { inputs: _final: prev: {
backscrub = prev.pkgs.callPackage ../pkgs/backscrub { backscrub = prev.pkgs.callPackage ../pkgs/backscrub {
inherit (prev.pkgs) inherit (prev.pkgs)
gcc gcc
@ -29,4 +29,6 @@ _final: prev: {
pds = prev.pkgs.callPackage ../pkgs/pds { }; pds = prev.pkgs.callPackage ../pkgs/pds { };
pdsadmin = prev.pkgs.callPackage ../pkgs/pdsadmin { }; pdsadmin = prev.pkgs.callPackage ../pkgs/pdsadmin { };
ghostty = inputs.ghostty.packages.${prev.system}.ghostty;
} }

View file

@ -68,6 +68,86 @@ in
server = false; server = false;
fontSize = 16; fontSize = 16;
}; };
ghostty = {
enable = true;
settings = {
# font-family = "Iosevka NF";
# font-size = 16;
# theme = "catppuccin-mocha";
# background-opacity = 0.9;
# keybind = [
# "ctrl+comma=open_config"
# "ctrl+shift+comma=reload_config"
# "ctrl+shift+q=quit"
# "ctrl+enter=toggle_fullscreen"
# "ctrl+shift+v=paste_from_clipboard"
# "shift+insert=paste_from_selection"
# "ctrl+shift+a=select_all"
# "shift+up=adjust_selection:up"
# "shift+right=adjust_selection:right"
# "shift+down=adjust_selection:down"
# "shift+left=adjust_selection:left"
# "alt+one=goto_tab:1"
# "alt+two=goto_tab:2"
# "alt+three=goto_tab:3"
# "alt+four=goto_tab:4"
# "alt+five=goto_tab:5"
# "alt+six=goto_tab:6"
# "alt+seven=goto_tab:7"
# "alt+eight=goto_tab:8"
# "alt+nine=goto_tab:9"
# "ctrl+minus=decrease_font_size:1"
# "ctrl+equal=increase_font_size:1"
# "ctrl+plus=increase_font_size:1"
# "ctrl+zero=reset_font_size"
# "ctrl+shift+n=new_window"
# "ctrl+shift+t=new_tab"
# "ctrl+shift+o=new_split:right"
# "ctrl+shift+e=new_split:down"
# "ctrl+shift+c=copy_to_clipboard"
# "ctrl+shift+tab=previous_tab"
# "ctrl+shift+left=previous_tab"
# "ctrl+page_up=previous_tab"
# "ctrl+tab=next_tab"
# "ctrl+page_down=next_tab"
# "ctrl+shift+right=next_tab"
# "super+ctrl+right_bracket=goto_split:next"
# "super+ctrl+left_bracket=goto_split:previous"
# "ctrl+alt+up=goto_split:top"
# "ctrl+alt+right=goto_split:right"
# "ctrl+alt+down=goto_split:bottom"
# "ctrl+alt+left=goto_split:left"
# "super+ctrl+shift+up=resize_split:up,10"
# "super+ctrl+shift+right=resize_split:right,10"
# "super+ctrl+shift+down=resize_split:down,10"
# "super+ctrl+shift+left=resize_split:left,10"
# "super+ctrl+shift+equal=equalize_splits"
# "ctrl+shift+page_down=jump_to_prompt:1"
# "ctrl+shift+page_up=jump_to_prompt:-1"
# "ctrl+alt+shift+j=write_scrollback_file:open"
# "ctrl+shift+w=close_surface"
# "shift+page_up=scroll_page_up"
# "shift+home=scroll_to_top"
# "shift+end=scroll_to_bottom"
# "shift+page_down=scroll_page_down"
# "ctrl+shift+j=write_scrollback_file:paste"
# "alt+f4=close_window"
# "ctrl+shift+enter=toggle_split_zoom"
# "ctrl+shift+i=inspector:toggle"
# ];
# window-decoration = false;
};
};
git = { git = {
enable = true; enable = true;
name = "Erwin Boskma"; name = "Erwin Boskma";
@ -245,7 +325,7 @@ in
easyeffects easyeffects
fd fd
ffmpeg-full ffmpeg-full
inputs.ghostty.packages.${pkgs.system}.ghostty # inputs.ghostty.packages.${pkgs.system}.ghostty
icemon icemon
imagemagick imagemagick
(imv.override { (imv.override {