Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dircolors
Original file line number Diff line number Diff line change
Expand Up @@ -544,4 +544,4 @@ TERM xterm-256color
TERM xterm-88color
TERM xterm-color
TERM xterm-debian
TERM xterm-kitty
TERM xterm-kitty
79 changes: 37 additions & 42 deletions .github/workflows/dotfiles-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Dotfiles CI
name: CI

on:
push:
Expand All @@ -8,70 +8,65 @@ on:
workflow_dispatch:

jobs:
lint:
name: Lint Dotfiles
pre-commit:
name: Pre-commit Checks
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Lint shell scripts
run: |
sudo apt-get update
sudo apt-get install -y shellcheck
find . -name '*.sh' -type f -print0 | xargs -0 shellcheck || true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Check YAML syntax
- name: Install pre-commit
run: |
sudo apt-get install -y yamllint
find . -name '*.yml' -o -name '*.yaml' | xargs yamllint || true
python -m pip install --upgrade pip
pip install pre-commit

- name: Run pre-commit hooks
run: pre-commit run --all-files

nix-build:
name: Nix Build
setup-and-build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Nix
uses: cachix/install-nix-action@v26
uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes

- name: Build Nix configuration
- name: Build and apply Home Manager config
env:
NIXPKGS_ALLOW_UNFREE: "1"
run: |
if [ -f "flake.nix" ]; then
nix build .#homeConfigurations.$(whoami).activationPackage --show-trace || echo "Nix build attempted"
else
echo "No flake.nix found, skipping Nix build"
fi

home-manager-check:
name: Home Manager Configuration Check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Nix
uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
echo "Checking Nix installation and flake support"
nix --version
grep -qxF 'experimental-features = nix-command flakes' ~/.config/nix/nix.conf || \
echo 'experimental-features = nix-command flakes' >> ~/.config/nix/nix.conf
echo "Running flake build (home-manager switch)"
nix run home-manager -- switch --flake ./home-manager#mynixos --impure -b backup

- name: Check Home Manager configuration
- name: Validate dotfile presence
run: |
if [ -f "home.nix" ] || [ -f "flake.nix" ]; then
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
nix-channel --update
echo "Home Manager configuration found"
else
echo "No Home Manager configuration found, skipping"
fi
test -f ~/.config/nvim/init.lua || echo "Missing Neovim config"
test -f ~/.config/aerospace/aerospace.toml || echo "Missing aerospace config"
test -f ~/.config/wezterm/config.lua || echo "Missing Wezterm config"
test -f ~/.zshrc || echo "Missing Zsh config"
test -f ~/.gitconfig || echo "Missing Git config"
test -f ~/.tmux.conf || echo "Missing Tmux config"

- name: Show Home Manager generations
run: home-manager generations || true

validation:
name: Validation Summary
runs-on: ubuntu-latest
needs: [lint, nix-build, home-manager-check]
needs: [pre-commit, setup-and-build]
steps:
- name: All checks passed
run: echo "All validation checks completed successfully!"
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-yaml
- id: check-toml
- id: end-of-file-fixer
- id: check-json
- id: trailing-whitespace
- id: mixed-line-ending
2 changes: 1 addition & 1 deletion .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ for method in GET HEAD POST PUT DELETE TRACE OPTIONS; do
done

#######################################################
# Nix
# Nix
#######################################################

export NIX_CONF_DIR=$HOME/.config/nix
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ build:
exit 1; \
}
NIXPKGS_ALLOW_UNFREE=1 nix run home-manager -- switch --flake ./home-manager#mynixos --impure -b backup

9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
dotfiles

My Dotfiles for git, vim/nvim, zsh and more.
My Dotfiles for git, vim/nvim, zsh and more.

### Steps to setup these dotfiles on your machine
1. Clone this repo in $HOME/dotfiles (~/dotfiles) directory
```
# if SSH has been added for the machine
git clone git@github.com:aightmunam/dotfiles.git
git clone git@github.com:aightmunam/dotfiles.git

git clone https://github.com/aightmunam/dotfiles.git
```
#### Using Nix home-manager:
2. Navigate into dotfiles/nix directory
```
make setup
make build
make build
```

3 changes: 1 addition & 2 deletions git/.gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
path = ~/.gitconfig.local
[user]
name = Munam Mubashir
email = 38868658+aightmunam@users.noreply.github.com
email = 38868658+aightmunam@users.noreply.github.com
[status]
relativePaths = true
[pull]
Expand Down Expand Up @@ -70,4 +70,3 @@
current = yellow reverse
local = yellow
remote = green

1 change: 0 additions & 1 deletion git/.gitignore_global
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,3 @@ pyrightconfig.json # zed ide specific (allows adding venv/python path)
Icon?
ehthumbs.db
Thumbs.db

2 changes: 1 addition & 1 deletion home-manager/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
};
outputs = inputs:
let
username = builtins.getEnv "USER";
username = builtins.getEnv "USER";
flakeContext = {
inherit inputs username;
};
Expand Down
1 change: 0 additions & 1 deletion nvim/.stylua.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ indent_type = "Spaces"
indent_width = 2
quote_style = "ForceSingle"
call_parentheses = "None"

1 change: 0 additions & 1 deletion tmux/.tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,3 @@ set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'vaaleyard/tmux-dotbar'
set -g @tmux-dotbar-position bottom
run '~/.tmux/plugins/tpm/tpm'

2 changes: 1 addition & 1 deletion vim/autoload/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
*

# except this file
!.gitignore
!.gitignore
2 changes: 1 addition & 1 deletion vim/colors/silverwind.vim
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ highlight mailEmail ctermfg=107 cterm=underline
highlight SpellBad ctermfg=160 ctermbg=NONE cterm=underline
highlight SpellRare ctermfg=168 ctermbg=NONE cterm=underline
highlight SpellCap ctermfg=189 ctermbg=NONE cterm=underline
highlight MatchParen ctermfg=15 ctermbg=23
highlight MatchParen ctermfg=15 ctermbg=23
2 changes: 1 addition & 1 deletion vim/plugged/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
*

# except this file
!.gitignore
!.gitignore
Loading