Skip to content

MiriPii/dotfiles

Repository files navigation

Dotfiles

My magic configuration for dots and configs.

Currently I manage my dotfiles with gnu stow. The stow -command is used to create symlinks for files in the parent directory.

How-To

The setup assumes this repo is located in the root of your home directory ~/dotfiles. Stow defaults to creating symlinks to the parent directory, thus user configuration works without specifying the repo.

If your repo is in another location (e.g. ~/scm/dotfiles) you'll need to use the -d flag with the repo directory location (stow -d ~/scm/dotfiles).

To setup configs to user $HOME see Install Config (default). For config in other locations (such as T440s clickpad configuration -> /etc/X11), see root config. To backup new config, see here.

Install Config

  1. Navigate to home directory and copy the repo

    cd ~ && git clone git@github.com:MiriPii/dotfiles.git && cd dotfiles
  2. Choose the config to install and simulate changes

    # (default) create link to parent directory
    stow -n zsh # For zsh config

    This will symlink all files inside zsh (currently ~/.zshrc) into the parent directory. If the file already exist, stow will give a warning.

  3. Rename the old existing configurations if you received warnings

    Example given for .zshrc

    # append with '.old'
    mv ~/.zshrc ~/.zshrc.old
  4. Make the changes and create symlinks

    After conflicts have been resolved and dry run gives no warnings run the command without -n-flag.

    cd ~/dotfiles
    stow zsh

Custom Location / root config

  1. Simulate a dry run to see conflicts

    # stow to custom target directory
    sudo stow -n -t / T440s-clickpad
    
    # custom repo location and custom target
    sudo stow -n -d /home/<user>/scm/dotfiles -t / T440s-clickpad
  2. Fix conflicts and run without the -n flag

Backup new config

To add new configurations to the backup create a new directory and copy the files (including the tree-path).

# cp -R --parents <path-to-file-from-home> <dotfiles-configname>
# e.g. for NeoVim/nvChad config
~ pwd
/home/MiriPii
~ cp -R --parents .config/nvim/lua/custom/chadrc.lua dotfiles/NeoVim
~ tree -a ~/dotfiles/NeoVim
dotfiles/NeoVim
└── .config
    └── nvim
        └── lua
            └── custom
                └── chadrc.lua

About

linux config files - managed with gnu stow

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published