神刀安全网

F-dotfiles, GNU stow with healthy organization guidelines

F-dotfiles, GNU stow with healthy organization guidelines

F-dotfiles is an opiniated dotfiles organization scheme based on stow.
Highest priorities are ease of maintenance and deployment on both Linux and OS X.

Install

  • clone the repository : git clone https://github.com/Kraymer/f-dotfiles.git ~/
    Important: it must be cloned in your $HOME for .stowrc files to work as expected
  • execute stow stow first to install stow global ignore file

Then, edit around and stow away!

Guidelines

F-dotfiles, GNU stow with healthy organization guidelines Directories naming rules

Few simple rules to make the nature of stow packages explicit :

F-dotfiles, GNU stow with healthy organization guidelines Documentation

Each package has a README.md that introduces the package features.

F-dotfiles, GNU stow with healthy organization guidelines Secret files

Secret files that should not be published must have .sec or /sec/ in their filepath to be ignored by the root .gitignore file. If not possible, then declare the file in a /.gitignore inside the containing package.

Example: qifqif package .

Each secret file should be accompagnied by an .example file that is commited instead, to illustrate the use.

How to keep secret files in the repository for easy deployment while having a public version without them on my Github?

Disclaimer: best practice is to NOT keep secrets files in a version system

Create a branch private and add a private repository (paying on Github, but free elsewhere) as remote.

Append !*.secret pattern to /.gitignore

Use git-secret to encrypt sec files and commit resulting .secret files in the repository.

Merge master into private at will, and use the private repo for your own deployments.

F-dotfiles, GNU stow with healthy organization guidelines Cross-platform friendly

Where to save a file that is installed at different locations depending on the OS ?

Create the part of the filepath that is common to the two OS in <package>/_common . Then create a subpackage directory for each os and link the common file from it.

Example: sublime_text_3 package

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » F-dotfiles, GNU stow with healthy organization guidelines

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址