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

Dumb Symlinks #2518

Closed
Krutonium opened this issue Nov 29, 2021 · 4 comments
Closed

Dumb Symlinks #2518

Krutonium opened this issue Nov 29, 2021 · 4 comments
Assignees
Labels

Comments

@Krutonium
Copy link

Krutonium commented Nov 29, 2021

So basically I have a game I want to have the config for centralized. I also want that game to be able to update it's own config. Seems reasonable, yes?

So what I've done is in my home.nix I've defined home.file.".config/OpenRCT2/config.ini".source = ./config/openrct2.conf - which almost works, except instead of it being a link to the original, it appears that home-manager copies it elsewhere, and then links that. This would be fine, except as i said I need the game to be able to edit it's own config, and I want to be able to commit it to GitHub easily.

config.ini -> /nix/store/wqdjm5w54va5qgbdvhzqm7k5nwsz5qxs-home-manager-files/.config/OpenRCT2/config.ini

Is there a way around this, or a flag I don't know about?

(Also while I'm here, how do I set my cursors? (gtk.cursorTheme doesn't exist))

@berbiche
Copy link
Member

berbiche commented Dec 2, 2021

Hi,

Have you tried using config.lib.hm.mkOutOfStoreSymlink?
This will allow you to create a symlink to a file.

Note however that you cannot use a path literal and will to use an absolute path ("${config.home.homeDirectory}/my-home-manager-config/openrct2.conf").

See #2085

@Krutonium
Copy link
Author

Okay, so how does that work though?
"${config.home.homeDirectory}/my-home-manager-config/openrct2.conf"
Appears to only specify the source, but not the destination?

@berbiche
Copy link
Member

berbiche commented Dec 2, 2021

Okay, so how does that work though? "${config.home.homeDirectory}/my-home-manager-config/openrct2.conf" Appears to only specify the source, but not the destination?

See this reply in the thread linked in my original answer: #2085 (comment)

@Krutonium
Copy link
Author

Oh I see, Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants