Skip to content

Commit

Permalink
Refactor config path (#308)
Browse files Browse the repository at this point in the history
* Refactor config path

* Remove outdated config
  • Loading branch information
kachick authored Sep 11, 2023
1 parent bbee97f commit 0bb192c
Show file tree
Hide file tree
Showing 29 changed files with 13 additions and 23 deletions.
3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ insert_final_newline = true
[*.md]
trim_trailing_whitespace = false

[home/.config/git/config]
indent_style = tab

[{Makefile,*.mk,*.go,.gitmodules,*.*sh,.*shrc,*shenv,.bash_*}]
indent_style = tab
indent_size = 4
2 changes: 0 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,3 @@ jobs:
.
.github
.vscode
home/.config
home/.stack
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
# Don't include any history files! It might make an accident... :scream:
*hist*

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

dist/
tmp/

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ Also known as [盆栽(bonsai)](https://en.wikipedia.org/wiki/Bonsai) 🌳

## Installation - Windows

Read [windows steps and tips](windows/README.md)
Read [windows steps and tips](windows.md)
8 changes: 4 additions & 4 deletions cmd/setup_windows_terminals/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ func main() {
}

copies := []fileutils.Copy{
{Src: filepath.Join(dotsPath, "home", ".config", "starship.toml"), Dst: filepath.Join(homePath, ".config", "starship.toml")},
{Src: filepath.Join(dotsPath, "home", ".config", "alacritty", "alacritty-common.yml"), Dst: filepath.Join(homePath, ".config", "alacritty", "alacritty-common.yml")},
{Src: filepath.Join(dotsPath, "home", ".config", "alacritty", "alacritty-windows.yml"), Dst: filepath.Join(homePath, ".config", "alacritty", "alacritty.yml")},
{Src: filepath.Join(dotsPath, "windows", "config", "Profile.ps1"), Dst: pwshProfilePath},
{Src: filepath.Join(dotsPath, "config", "starship", "starship.toml"), Dst: filepath.Join(homePath, ".config", "starship.toml")},
{Src: filepath.Join(dotsPath, "config", "alacritty", "common.yml"), Dst: filepath.Join(homePath, ".config", "alacritty", "common.yml")},
{Src: filepath.Join(dotsPath, "config", "alacritty", "windows.yml"), Dst: filepath.Join(homePath, ".config", "alacritty", "alacritty.yml")},
{Src: filepath.Join(dotsPath, "config", "windows", "powershell", "Profile.ps1"), Dst: pwshProfilePath},
}

for _, copy := range copies {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
# All imports must either be absolute paths starting with `/`, or paths relative
# to the user's home directory starting with `~/`.
import:
- ~/.config/alacritty/alacritty-common.yml
- ~/.config/alacritty/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# All imports must either be absolute paths starting with `/`, or paths relative
# to the user's home directory starting with `~/`.
import:
- ~/.config/alacritty/alacritty-common.yml
- ~/.config/alacritty/common.yml

# Shell
#
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions home-manager/fish.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
programs.rtx.enableFishIntegration = true;
programs.zellij.enableFishIntegration = true;

xdg.configFile."fish/fish_variables".source = ../home/.config/fish/fish_variables;
xdg.configFile."fish/functions/fish_prompt.fish".source = ../home/.config/fish/functions/fish_prompt.fish;
xdg.configFile."fish/fish_variables".source = ../config/fish/fish_variables;
xdg.configFile."fish/functions/fish_prompt.fish".source = ../config/fish/functions/fish_prompt.fish;

programs.fish = {
enable = true;
Expand Down
8 changes: 4 additions & 4 deletions home-manager/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@

# Do not alias home.nix into `xdg.configFile`, it actually cannot be used because of using many relative dirs
# So you should call `home-manager switch` with `-f ~/repos/dotfiles/home.nix`
xdg.configFile."alacritty/alacritty-common.yml".source = ../home/.config/alacritty/alacritty-common.yml;
xdg.configFile."alacritty/alacritty.yml".source = ../home/.config/alacritty/alacritty-unix.yml;
xdg.configFile."alacritty/common.yml".source = ../config/alacritty/common.yml;
xdg.configFile."alacritty/alacritty.yml".source = ../config/alacritty/unix.yml;

# Not under "starship/starship.toml"
xdg.configFile."starship.toml".source = ../home/.config/starship.toml;
xdg.configFile."starship.toml".source = ../config/starship/starship.toml;

# - 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 = ../config/stack/config.yaml;

# Should have `root = true` in the file. - https://github.com/kachick/anylang-template/blob/45d7ef685ac4fd3836c3b32b8ce8fb45e909b771/.editorconfig#L1
# Intentionally avoided to use https://github.com/nix-community/home-manager/blob/f58889c07efa8e1328fdf93dc1796ec2a5c47f38/modules/misc/editorconfig.nix
Expand Down
1 change: 0 additions & 1 deletion internal/constants/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ func GetTyposTargetedRoots() []string {
return []string{
".",
".github", ".vscode",
"home/.config", "home/.stack",
}
}
File renamed without changes.

0 comments on commit 0bb192c

Please sign in to comment.