Add ghostty

This commit is contained in:
Daniel Lundin 2024-08-10 23:06:08 +02:00
parent 389907c2d4
commit 1fae8d3e9c
No known key found for this signature in database
5 changed files with 359 additions and 2 deletions

View file

@ -35,6 +35,22 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1659877975, "lastModified": 1659877975,
@ -50,6 +66,122 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_2": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_4": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"ghostty": {
"inputs": {
"nixpkgs-stable": [
"nixpkgs"
],
"nixpkgs-unstable": [
"nixpkgs"
],
"zig": "zig",
"zls": "zls"
},
"locked": {
"lastModified": 1723350205,
"narHash": "sha256-+Nks9F8VuC9w8X2YaHU1+420Ky2DHP8n6aTg78l3dRE=",
"ref": "refs/heads/main",
"rev": "1cbeb264c908fecfe54c3fff260be28169852c09",
"revCount": 6877,
"type": "git",
"url": "ssh://git@github.com/ghostty-org/ghostty"
},
"original": {
"type": "git",
"url": "ssh://git@github.com/ghostty-org/ghostty"
}
},
"ghostty-hm": {
"locked": {
"lastModified": 1702368251,
"narHash": "sha256-hafrDmzGplzm+vdIo+LkOjRfA4qRcy5JmpGGksnht5c=",
"owner": "clo4",
"repo": "ghostty-hm-module",
"rev": "887e13a6e7acf5ffaab0119d96e476d84db90904",
"type": "github"
},
"original": {
"owner": "clo4",
"repo": "ghostty-hm-module",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"ghostty",
"zls",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -70,6 +202,18 @@
"type": "github" "type": "github"
} }
}, },
"langref": {
"flake": false,
"locked": {
"narHash": "sha256-O6p2tiKD8ZMhSX+DeA/o5hhAvcPkU2J9lFys/r11peY=",
"type": "file",
"url": "https://raw.githubusercontent.com/ziglang/zig/0fb2015fd3422fc1df364995f9782dfe7255eccd/doc/langref.html.in"
},
"original": {
"type": "file",
"url": "https://raw.githubusercontent.com/ziglang/zig/0fb2015fd3422fc1df364995f9782dfe7255eccd/doc/langref.html.in"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1696019113, "lastModified": 1696019113,
@ -105,6 +249,8 @@
"root": { "root": {
"inputs": { "inputs": {
"colmena": "colmena", "colmena": "colmena",
"ghostty": "ghostty",
"ghostty-hm": "ghostty-hm",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
} }
@ -124,6 +270,126 @@
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"zig": {
"inputs": {
"flake-compat": [
"ghostty"
],
"flake-utils": "flake-utils_2",
"nixpkgs": [
"ghostty",
"nixpkgs-stable"
]
},
"locked": {
"lastModified": 1723291738,
"narHash": "sha256-C3DobEyzw47Rvs9tRpe8XGrqGl4hLABu1wocjxczJ/U=",
"owner": "mitchellh",
"repo": "zig-overlay",
"rev": "d132903f2088ee03cf3561368a81cd3bd850f5ff",
"type": "github"
},
"original": {
"owner": "mitchellh",
"repo": "zig-overlay",
"type": "github"
}
},
"zig-overlay": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_4",
"nixpkgs": [
"ghostty",
"zls",
"nixpkgs"
]
},
"locked": {
"lastModified": 1722600600,
"narHash": "sha256-bRpvmyAvt4OFbQJlmAURyW1To8nlRjNcQJdbOyI1MLE=",
"owner": "mitchellh",
"repo": "zig-overlay",
"rev": "4c95bb8378ca31cc06eba0a9ee0c04851221c193",
"type": "github"
},
"original": {
"owner": "mitchellh",
"repo": "zig-overlay",
"type": "github"
}
},
"zls": {
"inputs": {
"flake-utils": "flake-utils_3",
"gitignore": "gitignore",
"langref": "langref",
"nixpkgs": [
"ghostty",
"nixpkgs-stable"
],
"zig-overlay": "zig-overlay"
},
"locked": {
"lastModified": 1722987529,
"narHash": "sha256-r7tnq70psZQXfLlDj+XzidBj352vfQFrICC7hfKHw7M=",
"owner": "zigtools",
"repo": "zls",
"rev": "d8084a342f40b444addf772fdef36a589299ebe6",
"type": "github"
},
"original": {
"owner": "zigtools",
"ref": "master",
"repo": "zls",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -6,6 +6,15 @@
home-manager.url = "github:nix-community/home-manager"; home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
ghostty = {
url = "git+ssh://git@github.com/ghostty-org/ghostty";
inputs = {
nixpkgs-stable.follows = "nixpkgs";
nixpkgs-unstable.follows = "nixpkgs";
};
};
ghostty-hm.url = "github:clo4/ghostty-hm-module";
}; };
outputs = outputs =
@ -13,6 +22,8 @@
self, self,
nixpkgs, nixpkgs,
colmena, colmena,
ghostty,
ghostty-hm,
home-manager, home-manager,
... ...
}@inputs: }@inputs:
@ -22,7 +33,10 @@
mkHome = mkHome =
modules: modules:
home-manager.lib.homeManagerConfiguration { home-manager.lib.homeManagerConfiguration {
modules = [ ./home/common ] ++ modules; modules = [
ghostty-hm.homeModules.default
./home/common
] ++ modules;
pkgs = nixpkgs.legacyPackages.x86_64-linux; pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { extraSpecialArgs = {
inherit inputs outputs; inherit inputs outputs;

View file

@ -5,6 +5,7 @@
./broot.nix ./broot.nix
./devel.nix ./devel.nix
./fish.nix ./fish.nix
./ghostty.nix
./gnome.nix ./gnome.nix
./k8s.nix ./k8s.nix
./nix.nix ./nix.nix

75
home/common/ghostty.nix Normal file
View file

@ -0,0 +1,75 @@
{
config,
inputs,
lib,
pkgs,
...
}:
{
config = lib.mkIf config.shelman.desktop.enable {
home.packages = with pkgs; [ inputs.ghostty.packages.${pkgs.system}.default ];
programs.ghostty = {
enable = true;
settings = {
font-size = 14;
font-family = "BerkeleyMono Nerd Font";
font-feature = [
# "ss02", -- Clean zero
"ss03" # Slashed zero
# "ss04", -- Cut zero
];
mouse-hide-while-typing = true;
cursor-style = "block";
adjust-cursor-thickness = 5;
shell-integration = "fish";
window-decoration = true;
gtk-tabs-location = "bottom";
window-padding-x = 4;
window-padding-y = 4;
window-padding-balance = true;
window-padding-color = "extend";
window-theme = "system";
unfocused-split-opacity = 1.0;
background = "#fefeff";
foreground = "#222222";
cursor-color = "#aa0000";
selection-background = "#ffe6a4";
selection-foreground = "#483600";
palette = [
"0=#000000"
"1=#9e001d"
"2=#306300"
"3=#deae00"
"4=#00669e"
"5=#7d009e"
"6=#008a9e"
"7=#f7f7f7"
"8=#000000"
"9=#ff0035"
"10=#509e00"
"11=#ffc900"
"12=#00a7ff"
"13=#cb01ff"
"14=#00e0ff"
"15=#ffffff"
];
keybind = [
"alt+shift+c=copy_from_clipboard"
"alt+shift+v=paste_from_clipboard"
"ctrl+tab=goto_split:previous"
"ctrl+enter=toggle_split_zoom"
"alt+enter=toggle_fullscreen"
];
};
};
};
}

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { inputs, pkgs, ... }:
{ {
shelman = { shelman = {
desktop.enable = true; desktop.enable = true;
@ -11,6 +11,7 @@
gimp-with-plugins gimp-with-plugins
helvum helvum
inkscape inkscape
inputs.ghostty.packages.${pkgs.system}.default
moonlight-qt moonlight-qt
obsidian obsidian
pavucontrol pavucontrol