From 99198a910ee1e0c89223982e92501b74310e04f3 Mon Sep 17 00:00:00 2001 From: Dennis Date: Thu, 30 Jan 2025 23:27:57 +0100 Subject: [PATCH] Adapts home manager config for nvim and wezterm - Fixes symlinks for configuration folders - Installs wezterm as homebrew cask so nix-generated config does not interfere with symlinked config files --- home/darwin.nix | 2 ++ home/modules/nvim/default.nix | 8 ++++++-- home/modules/wezterm/default.nix | 12 ++++++------ hosts/dnsc-air/default.nix | 1 + 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/home/darwin.nix b/home/darwin.nix index 44253ba..5d7da83 100644 --- a/home/darwin.nix +++ b/home/darwin.nix @@ -10,6 +10,8 @@ GOPATH = "$HOME/go"; }; + xdg.enable = true; + imports = [ ./modules/git ./modules/fish diff --git a/home/modules/nvim/default.nix b/home/modules/nvim/default.nix index 676eafa..b990f1f 100644 --- a/home/modules/nvim/default.nix +++ b/home/modules/nvim/default.nix @@ -1,5 +1,9 @@ +{ config, ... }: + { - home.file.".config/nvim" = { - source = ./config; + xdg.configFile."nvim" = { + # mkOutOfStoreSymlink needs an absolute path, otherwise it does not work: https://github.com/nix-community/home-manager/issues/676#issuecomment-1595795685 + # TODO: At least make the location of the config folder dynamic so that it works on other machines + source = config.lib.file.mkOutOfStoreSymlink /Users/dennis/dev/nix-config/home/modules/nvim/config; }; } diff --git a/home/modules/wezterm/default.nix b/home/modules/wezterm/default.nix index 3e20e67..016f660 100644 --- a/home/modules/wezterm/default.nix +++ b/home/modules/wezterm/default.nix @@ -1,9 +1,9 @@ -{ - programs.wezterm = { - enable = true; - }; +{ config, ... }: - home.file.".config/wezterm" = { - source = ./config; +{ + xdg.configFile."wezterm" = { + # mkOutOfStoreSymlink needs an absolute path, otherwise it does not work: https://github.com/nix-community/home-manager/issues/676#issuecomment-1595795685 + # TODO: At least make the location of the config folder dynamic so that it works on other machines + source = config.lib.file.mkOutOfStoreSymlink /Users/dennis/dev/nix-config/home/modules/wezterm/config; }; } diff --git a/hosts/dnsc-air/default.nix b/hosts/dnsc-air/default.nix index 50ace99..11e703d 100644 --- a/hosts/dnsc-air/default.nix +++ b/hosts/dnsc-air/default.nix @@ -84,6 +84,7 @@ "eurkey" "karabiner-elements" "vial" + "wezterm" ]; };