Fix symlinks which arent tied to store for dotfiles. This means we can

change them without rebuilding. Additionally, this means that lazy lock
works.
This commit is contained in:
Martin Lasson 2025-01-29 18:45:00 +01:00
parent 5bcc348893
commit 31ff307bfd

View file

@ -1,8 +1,63 @@
{
pkgs,
config,
neovim-flake,
...
}:
let
dotfiles = [
[
".zshrc"
"zsh/.zshrc"
]
[
".config/nvim"
"nvim"
]
[
".config/yazi"
"yazi"
]
[
".config/starship.toml"
"starship/starship.toml"
]
[
".tmux.conf"
"tmux/.tmux.conf"
]
[
".config/tmux"
"tmux"
]
[
".config/bat"
"bat"
]
[
".config/ghostty"
"ghostty"
]
[
".config/confutils"
"confutils"
]
[
".config/wallpapers"
"wallpapers"
]
];
symlinkFiles = builtins.listToAttrs (
map (file: {
name = builtins.elemAt file 0;
value = {
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/git/.dotfiles/${builtins.elemAt file 1}";
};
}) dotfiles
);
in
{
programs = {
zsh = {
@ -52,17 +107,7 @@
tldr
nerd-fonts.caskaydia-mono
];
file = {
".zshrc".source = ../../zsh/.zshrc;
".config/nvim".source = ../../nvim;
".config/yazi".source = ../../yazi;
".config/starship.toml".source = ../../starship/starship.toml;
".tmux.conf".source = ../../tmux/.tmux.conf;
".config/tmux".source = ../../tmux;
".config/bat".source = ../../bat;
".config/ghostty".source = ../../ghostty;
".config/confutils".source = ../../confutils;
".config/wallpapers".source = ../../wallpapers;
};
file = symlinkFiles;
};
}