Skip to content

Commit

Permalink
Merge pull request #198 from kachick/refactor-structure
Browse files Browse the repository at this point in the history
Move `.config` to `home/.config`
  • Loading branch information
kachick authored Jul 28, 2023
2 parents f265d56 + 3c63680 commit b5d42ec
Show file tree
Hide file tree
Showing 19 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ insert_final_newline = true
[*.md]
trim_trailing_whitespace = false

[.config/git/config]
[home/.config/git/config]
indent_style = tab
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*hist*

# Managed by home-manager
.config/fish/conf.d/
.config/fish/config.fish
home/.config/fish/conf.d/
home/.config/fish/config.fish

dist/
tmp/
5 changes: 5 additions & 0 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,8 @@ args = [
'dist',
'./...',
]

[tasks.apply]
script = [
"home-manager switch -f ./home/.config/home-manager/home.nix",
]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ Also known as [盆栽(bonsai)](https://en.wikipedia.org/wiki/Bonsai) 🌳

## Installation

1. Do `Development` steps
1. Finishes `Development` steps
1. Install [nix-community/home-manager](https://github.com/nix-community/home-manager)
1. Set `XDG_*` into current env. `. ./home/.bashrc`
1. Make sure `$XDG_CONFIG_HOME/home-manager/home.nix` does not exists. If not, check the content and remove
1. `makers apply`
1. Run `go run ./cmd/mksym --linker path-from --linked path-to` if needed
1. `home-manager switch`
1. (optional) Install [jdxcode/rtx](https://github.com/jdxcode/rtx) to manage subdivided versions

## I don't know ??? - I have just installed OS, I am 🚼
Expand Down
2 changes: 1 addition & 1 deletion cmd/fmt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func main() {
{"dprint", []string{"fmt"}},
{"shfmt", append([]string{"--write"}, bashPaths...)},
{"nixpkgs-fmt", nixPaths},
{"typos", []string{".", ".github", ".config", ".vscode", "--write-changes"}},
{"typos", []string{".", ".github", "home/.config", ".vscode", "--write-changes"}},
{"go", []string{"fmt", "./..."}},
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/lint/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func main() {
{"shfmt", append([]string{"--diff"}, bashPaths...)},
{"shellcheck", bashPaths},
{"nixpkgs-fmt", append([]string{"--check"}, nixPaths...)},
{"typos", []string{".", ".github", ".config", ".vscode"}},
{"typos", []string{".", ".github", "home/.config", ".vscode"}},
{"gitleaks", []string{"detect"}},
{"go", []string{"vet", "./..."}},
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@
xdg.configFile."homemade/.aliases.sh".source = ../homemade/.aliases.sh;

# basic shell dotfiles should be put in ~/ except part of zsh files
home.file.".bashrc".source = ../../home/.bashrc;
home.file.".bash_logout".source = ../../home/.bash_logout;
home.file.".zshenv".source = ../../home/.zshenv;
home.file.".bashrc".source = ../../../home/.bashrc;
home.file.".bash_logout".source = ../../../home/.bash_logout;
home.file.".zshenv".source = ../../../home/.zshenv;

# - stack manager can not found in https://github.com/nix-community/home-manager/tree/8d243f7da13d6ee32f722a3f1afeced150b6d4da/modules/programs
# - https://github.com/kachick/dotfiles/issues/142
home.file.".stack/config.yaml".source = ../../home/.stack/config.yaml;
home.file.".stack/config.yaml".source = ../../../home/.stack/config.yaml;

# https://github.com/rbenv/rbenv-default-gems/issues/17
home.file.".default-gems".text = ''
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit b5d42ec

Please sign in to comment.