diff --git a/flake.lock b/flake.lock index 9aae013..c3a914a 100644 --- a/flake.lock +++ b/flake.lock @@ -215,11 +215,11 @@ ] }, "locked": { - "lastModified": 1723015306, - "narHash": "sha256-jQnFEtH20/OsDPpx71ntZzGdRlpXhUENSQCGTjn//NA=", + "lastModified": 1724435763, + "narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=", "owner": "nix-community", "repo": "home-manager", - "rev": "b3d5ea65d88d67d4ec578ed11d4d2d51e3de525e", + "rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be", "type": "github" }, "original": { @@ -288,11 +288,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1723175592, - "narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=", + "lastModified": 1724479785, + "narHash": "sha256-pP3Azj5d6M5nmG68Fu4JqZmdGt4S4vqI5f8te+E/FTw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5e0ca22929f3342b19569b21b2f3462f053e497b", + "rev": "d0e1602ddde669d5beb01aec49d71a51937ed7be", "type": "github" }, "original": { @@ -317,11 +317,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1724706433, - "narHash": "sha256-FsFQhf2PbMc8OFXYRrpM9I6sanQiIUYWS0KbXdXNRk8=", + "lastModified": 1724710305, + "narHash": "sha256-qotbY/mgvykExLqRLAKN4yeufPfIjnMaK6hQQFhE2DE=", "owner": "nix-community", "repo": "nixvim", - "rev": "7e3ed24e52e2d400b84b22524cba987a495a3f24", + "rev": "eac092c876e4c4861c6df0cff93e25b972b1842c", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index d9bc368..afaed28 100644 --- a/flake.nix +++ b/flake.nix @@ -28,14 +28,18 @@ modules = [ ./yadunut-mbp/home.nix ]; }; "yadunut@yadunut-mba" = home-manager.lib.homeManagerConfiguration { - pkgs = import nixpkgs { system = "aarch64-darwin"; config = { allowUnfree = true; }; }; - modules = [ ./yadunut-mba/home.nix ]; + extraSpecialArgs = { + inherit inputs; + }; + modules = [ + ./yadunut-mba/home.nix + ]; }; }; nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { diff --git a/modules/wezterm/default.nix b/modules/wezterm/default.nix new file mode 100644 index 0000000..289020b --- /dev/null +++ b/modules/wezterm/default.nix @@ -0,0 +1,10 @@ +{ config, pkgs, inputs, ... }: +{ + home.packages = [ + pkgs.comic-mono + ]; + programs.wezterm = { + enable = true; + extraConfig = builtins.readFile ./wezterm.lua; + }; +} \ No newline at end of file diff --git a/modules/wezterm/wezterm.lua b/modules/wezterm/wezterm.lua new file mode 100644 index 0000000..226c181 --- /dev/null +++ b/modules/wezterm/wezterm.lua @@ -0,0 +1,62 @@ +local wezterm = require 'wezterm' + +local config = wezterm.config_builder() + +local font = wezterm.font({family = "Comic Mono"}) + +config.front_end = "WebGpu" + +config.color_scheme = "Gruvbox Dark (Gogh)" +config.font = font +config.font_size = 13 +config.window_decorations = "RESIZE|INTEGRATED_BUTTONS" +config.window_frame = { + font = font, + font_size = 14, +} + +wezterm.on('update-status', function(window) + local SOLID_LEFT_ARROW = utf8.char(0xe0b2) + local color_scheme = window:effective_config().resolved_palette + local bg = color_scheme.background + local fg = color_scheme.foreground + + window:set_right_status(wezterm.format({ + { Background = { Color = 'none' }}, + { Foreground = { Color = bg }}, + { Text = SOLID_LEFT_ARROW }, + + { Background = { Color = bg }}, + { Foreground = { Color = fg }}, + { Text = ' ' .. wezterm.hostname() .. ' ' }, + })) +end) + +config.leader = { key = 'a', mods = 'CTRL', timeout_milliseconds = 1000 } + +function nav_pane(key, dir) + return { + key = key, + mods = "LEADER", + action = wezterm.action.ActivatePaneDirection(dir), + } +end + +config.keys = { + { + key = "\\", + mods = "LEADER", + action = wezterm.action.SplitHorizontal { domain = 'CurrentPaneDomain' } + }, + { + key = "-", + mods = "LEADER", + action = wezterm.action.SplitVertical { domain = 'CurrentPaneDomain' } + }, + nav_pane("h", "Left"), + nav_pane("j", "Down"), + nav_pane("k", "Up"), + nav_pane("l", "Right"), +} + +return config \ No newline at end of file diff --git a/yadunut-mba/home.nix b/yadunut-mba/home.nix index 3e3f3a5..47cb4e1 100644 --- a/yadunut-mba/home.nix +++ b/yadunut-mba/home.nix @@ -1,10 +1,11 @@ -{ config, pkgs, ... }: +{ config, pkgs, inputs, ... }: { imports = [ - (import ../modules/zsh.nix) - (import ../modules/neovim.nix) - (import ../modules/git.nix) + ../modules/zsh.nix + ../modules/neovim.nix + ../modules/git.nix + ../modules/wezterm ]; # Home Manager needs a bit of information about you and the paths it should # manage. @@ -30,6 +31,7 @@ pkgs.raycast pkgs.cocoapods pkgs.tailscale + pkgs.entr # # Adds the 'hello' command to your environment. It prints a friendly # # "Hello, world!" when run. # pkgs.hello diff --git a/yadunut-mbp/flake.lock b/yadunut-mbp/flake.lock deleted file mode 100644 index 7f250b5..0000000 --- a/yadunut-mbp/flake.lock +++ /dev/null @@ -1,48 +0,0 @@ -{ - "nodes": { - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1712730572, - "narHash": "sha256-rAVvdP77rEmgobvSgybqPAcHefv5dCXPH/ge6Ds+JtU=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "18f89ef74f0d48635488ccd6a5e30dc9d48a3a87", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1712608508, - "narHash": "sha256-vMZ5603yU0wxgyQeHJryOI+O61yrX2AHwY6LOFyV1gM=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "4cba8b53da471aea2ab2b0c1f30a81e7c451f4b6", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "home-manager": "home-manager", - "nixpkgs": "nixpkgs" - } - } - }, - "root": "root", - "version": 7 -}