nedots

command module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 2 Imported by: 0

README

builds.sr.ht status Go Reference

Open an issue here.

nedots

A dotfile management tool.

Manages configuration files

Usage:
  nedots [flags]
  nedots [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  config      Interact with nedots config file
  gather      Gather dotfiles by copying them into our cache
  help        Help about any command
  init        Setup or refresh nedots
  install     Install dotfiles by distributing cached files to their respective destination
  sync        Sync dotfiles  with remote

Flags:
  -c, --config string   config file path (default "/home/aiden/.config/nedots/config.yml")
  -h, --help            help for nedots
  -v, --verbose         enable verbose output

Use "nedots [command] --help" for more information about a command.

Install

go install git.sr.ht/~nedia/nedots@latest

Also available on the AUR. I recommend yay.

yay -S nedots

Config

There is a sample config in example/config.yml. Config lives in $XDG_CONFIG_HOME or ~/.config/nedots.

remote: https://git.sr.ht/~nedia/dots-sample
dots:
  - .profile
  - .config/river
repos:
  - remote: https://git.sr.ht/~nedia/config.nvim
    path: .config/nvim

Development

If you've forked or want to contribute, the following should help.

Working with src submodule

Clone the repository with --recursive.

git clone https://git.sr.ht/~nedia/nedots.go --recursive`
Working with the container
# Build as is
docker build --tag nedots .

# Build as this user instead of the default (me)
docker build -t nedots --build-arg USERNAME=myusername .

# Simply run the container and remove it once it's finished
docker run --interactive --tty --rm nedots:latest 

# List containers
docker ps --all

# Remove stale containers
docker rm nedots
docker rm --all

# Start the container and detach with `-d` and run `bash`, thereby leaving a 
# shell running
#
# Also mounts working directory so we can `go build` without rebuilding the 
# container
docker run -it --detach --name nedots\
  --volume "$PWD":/usr/src/nedots\
  nedots:latest bash

# Now run `go build` on the container we started previously
# Optionally include `-buildvcs false`
docker exec -it nedots\
  go build -C /usr/src/nedots -o /usr/local/bin/nedots .

# Finally attach to the container which is already running a shell
docker attach nedots

# Start the container again if it's exited
docker start --attach nedots

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL