Skip to content

Commit

Permalink
Update path of home-manager files since avoided to put under home
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Jul 31, 2023
1 parent 9c6cb72 commit 5432edb
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 17 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci-home.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,12 @@ jobs:
- os: ubuntu-22.04
cleanup-script: |
rm '/home/runner/.config/nix/nix.conf'
rm '/home/runner/.config/home-manager/home.nix'
rm '/home/runner/.bashrc'
rm '/home/runner/.bash_logout'
- os: macos-13
# Latest macOS sets default shell as zsh, but having .bashrc except .bash_logout
cleanup-script: |
rm '/Users/runner/.config/nix/nix.conf'
rm '/Users/runner/.config/home-manager/home.nix'
rm '/Users/runner/.bashrc'
runs-on: ${{ matrix.os }}
Expand All @@ -57,7 +55,7 @@ jobs:
run: |
${{ matrix.cleanup-script }}
- uses: actions/checkout@v3
- run: home-manager switch -f ./home/.config/home-manager/user-github-actions.nix
- run: home-manager switch -f ./home-manager/user-github-actions.nix
- name: Print shell paths
run: |
which fish
Expand Down
4 changes: 2 additions & 2 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ args = [
'switch',
'-n', # dry-run
'-f',
'./home/.config/home-manager/home.nix',
'./home-manager/home.nix',
]

[tasks.apply]
command = 'home-manager'
args = [
'switch',
'-f',
'./home/.config/home-manager/home.nix',
'./home-manager/home.nix',
]

[tasks.enable_login_shells]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{ pkgs, ... }:

{
xdg.configFile."fish/fish_variables".source = ../fish/fish_variables;
xdg.configFile."fish/functions/fish_prompt.fish".source = ../fish/functions/fish_prompt.fish;
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;

programs.fish = {
enable = true;
Expand Down
20 changes: 10 additions & 10 deletions home/.config/home-manager/home.nix β†’ home-manager/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,19 @@

# 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."git/config".source = ../git/config;
xdg.configFile."alacritty/alacritty.yml".source = ../alacritty/alacritty.yml;
xdg.configFile."git/config".source = ../home/.config/git/config;
xdg.configFile."alacritty/alacritty.yml".source = ../home/.config/alacritty/alacritty.yml;

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

# 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.".bashrc".source = ../home/.bashrc;
home.file.".bash_logout".source = ../home/.bash_logout;

# - 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;

# 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 Expand Up @@ -157,8 +157,8 @@

# - Tiny tools by me, they may be rewritten with another language.
# - Keep *.bash in shellscript naming in this repo for maintainability, the extname should be trimmed in the symlinks
xdg.dataFile."homemade/bin/bench_shells".source = ../../../home/.local/share/homemade/bin/bench_shells.bash;
xdg.dataFile."homemade/bin/updeps".source = ../../../home/.local/share/homemade/bin/updeps.bash;
xdg.dataFile."homemade/bin/la".source = ../../../home/.local/share/homemade/bin/la.bash;
xdg.dataFile."homemade/bin/zj".source = ../../../home/.local/share/homemade/bin/zj.bash;
xdg.dataFile."homemade/bin/bench_shells".source = ../home/.local/share/homemade/bin/bench_shells.bash;
xdg.dataFile."homemade/bin/updeps".source = ../home/.local/share/homemade/bin/updeps.bash;
xdg.dataFile."homemade/bin/la".source = ../home/.local/share/homemade/bin/la.bash;
xdg.dataFile."homemade/bin/zj".source = ../home/.local/share/homemade/bin/zj.bash;
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 5432edb

Please sign in to comment.