Skip to content

Allow stow to work both with paths outside of homedir and in the homedir #64

Open
@ghost

Description

Hi, Apologies if this is a dumb question/issue

My usecase is this:
I have a directory called "dotfiles" in my homedir, this is managed by stow and all packages in it are located in my homedir so no stowrc tinkering is needed

I have another directory called "dotfiles-extra" which manages packages outside of the homedir
Since the packages here need to be in /etc which is outside of my homedir and starts with a /, i need to use a stowrc to manually set the target.

So i use --target=/ ssh in my stowrc to stow my ssh config file to /etc/ssh with the contents of "ssh" being etc/ssh/sshd_config

The issue I'm having is I am trying to merge both directories into one big dotfile directory for ease of use/access but I can't seem to use stow with both homedir targets and targets outside of the homedir, this could possibly be solved if stow could check if the first directory in a package is called ROOT or another keyword and this would indicate to stow that the package should be linked outside of the users home directory, that way you could just run stow ssh as normal.

This would mean if I wanted to stow my ssh config the package dir would look like this ROOT/etc/ssh/sshd_config and would symlink to /etc/ssh/sshd_config

(I'd try implement this myself but my perl knowledge is very limited)

I've read through the manpage a few times and experimented many times with various methods but my best solution is to keep packages that require a location outside of the homedir in a separate repo with a stowrc that specifies the target outside of $HOME.

Would it be possible to use stow on a single repo that contains both non-homedir packages and homedir packages without using a different stow command for each package?

Apologies if this sounds like gibberish, I thought it'd be easier to explain before I typed all this up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions