Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nixos and home-manager mess up file diffing for FnlCompile hooks #41

Open
milespossing opened this issue Jan 20, 2025 · 0 comments
Open

Comments

@milespossing
Copy link

Hey,

Thanks so much for your work on this! I'm having a lot of fun configuring my nvim in fennel and tangerine does seem like the best way to do this!

I do notice just one thing I wanted to let you know: it would seem that when using home-manager to deploy dotfiles in nixos, the files end up with some weird timestamps. The reason for this would seem to be that when home-manager copies files, the dates of the files are set to be pretty old:

~
❯ alias lt="ls -l --no-permissions --no-filesize --no-git --icons=never --no-user --time-style iso"

~
❯ lt .config/nvim/fnl/
01-20 16:32 after-init.fnl -> /nix/store/y5zfgc8a579ssygn0a4dq9gaw4aycmvi-home-manager-files/.config/nvim/fnl/after-init.fnl
01-20 16:32 config.fnl -> /nix/store/y5zfgc8a579ssygn0a4dq9gaw4aycmvi-home-manager-files/.config/nvim/fnl/config.fnl
01-20 16:32 keymaps.lua -> /nix/store/y5zfgc8a579ssygn0a4dq9gaw4aycmvi-home-manager-files/.config/nvim/fnl/keymaps.lua
01-20 16:32 lib
01-20 16:32 opts.fnl -> /nix/store/y5zfgc8a579ssygn0a4dq9gaw4aycmvi-home-manager-files/.config/nvim/fnl/opts.fnl
01-20 16:32 plugins

~
❯ lt /nix/store/y5zfgc8a579ssygn0a4dq9gaw4aycmvi-home-manager-files/.config/nvim/fnl/
1969-12-31 after-init.fnl -> /nix/store/zn9j4g59bzk9ddjpkl4rvipvlwh8db2z-hm_nvimfennel/fnl/after-init.fnl
1969-12-31 config.fnl -> /nix/store/zn9j4g59bzk9ddjpkl4rvipvlwh8db2z-hm_nvimfennel/fnl/config.fnl
1969-12-31 keymaps.lua -> /nix/store/zn9j4g59bzk9ddjpkl4rvipvlwh8db2z-hm_nvimfennel/fnl/keymaps.lua
1969-12-31 lib
1969-12-31 opts.fnl -> /nix/store/zn9j4g59bzk9ddjpkl4rvipvlwh8db2z-hm_nvimfennel/fnl/opts.fnl
1969-12-31 plugins

Obviously this isn't your fault, and it also isn't your fault that using the getftime api seems to get the file time for the file behind the symlink (it's 1 every time)

I'm putting this here just in case someone else is having this problem, you'll need to add an extra activation script to your configuration which might look like this:

    home.activation.nvim-fnl-compile = lib.hm.dag.entryAfter ["writeBoundary"] ''
      ${pkgs.neovim}/bin/nvim --headless +":FnlCompile!" +qall
    '';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant