https://github.com/jesusmtnez/dotfiles
My personal nix dotfiles. Mirror from: https://codeberg.org/JesusMtnez/dotfiles
https://github.com/jesusmtnez/dotfiles
dotfiles emacs git macos nix nix-config nixos zsh zshrc
Last synced: 5 months ago
JSON representation
My personal nix dotfiles. Mirror from: https://codeberg.org/JesusMtnez/dotfiles
- Host: GitHub
- URL: https://github.com/jesusmtnez/dotfiles
- Owner: JesusMtnez
- License: mit
- Created: 2015-02-05T19:43:48.000Z (almost 11 years ago)
- Default Branch: main
- Last Pushed: 2025-06-22T06:03:28.000Z (5 months ago)
- Last Synced: 2025-06-22T07:18:33.885Z (5 months ago)
- Topics: dotfiles, emacs, git, macos, nix, nix-config, nixos, zsh, zshrc
- Language: Shell
- Homepage:
- Size: 4.29 MB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# JesusMtnez's dotfiles
_using nix to rule them all_
[![Built with nix][NIX-badge]][NIX-link]
[![woodpecker-status][STATUS-badge]][STATUS-link]
[![MIT LICENSE][LICENSE-badge]][LICENSE-link]
[STATUS-badge]: https://ci.codeberg.org/api/badges/13009/status.svg
[STATUS-link]: https://ci.codeberg.org/repos/13009
[NIX-badge]: https://img.shields.io/badge/nix-blue.svg?logo=nixos&labelColor=73C3D5
[NIX-link]: https://builtwithnix.org
[LICENSE-badge]: https://img.shields.io/badge/license-MIT-green.svg
[LICENSE-link]: /LICENSE
## Machines
| Name | | OS | DE | WM | Use |
| :-: | :-: | :-: | :-: | :-: | :-: |
| `albus` |
| NixOS 24.11 | KDE | - | _Personal_ |
## Installation
This dotfiles are manage using [`nix`](https://nixos.wiki/wiki/Nix) and [`home-manager`](https://github.com/rycee/home-manager).
### NixOS setup
1. Clone the repository and go inside the folder
```sh
nix run --extra-experimental-features nix-command --extra-experimental-features flakes github:nixos/nixpkgs#git -- clone https://codeberg.com/JesusMtnez/dotfiles $HOME/.dotfiles
```
2. Switch to `$HOSTNAME` flake.
```sh
nixos-rebuild switch --use-remote-sudo --flake $HOME/.dotfiles/.
```
### MacOS setup
Before attempting to use this dotfiles in macOS systems, we need to:
1. Install _Command Line Tools_ (includes `git`)
```sh
xcode-select --install
```
2. Install `homebrew` using its latest [`pkg`][brew-pkg].
```sh
# Setup brew in PATH
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> $HOME/.zprofile
```
3. Install `nix` using DeterminateSystems [`pkg`][nix-pkg].
[brew-pkg]: https://github.com/Homebrew/brew/releases
[nix-pkg]: https://install.determinate.systems/nix-installer-pkg/stable/Universal
4. Setup `nix-darwin` applying the flake for the first time.
```sh
nix run nix-darwin -- switch --flake $HOME/.dotfiles/.
```
5. Switch to `$HOSTNAME` flake.
```sh
# Using nix-darwin, build and switch to your configuration
darwin-rebuild switch --flake $HOME/.dotfiles/.
```
## Notes
#### Restore application menu in KDE
In _System Settings / Startup and Shutdown / Background Services_ disable _Application menus daemon_.
#### gnome-keyring integration in XFCE
In _Settings Manager / Session and Startup / Advanced_ check _Launch GNOME services at startup_.
### NixOS sqlite database corrupted
1. Check integrity: `sqlite3 /nix/var/nix/db/db.sqlite 'pragma integrity_check'`.
2. If the result is not `OK`:
```
# cd /nix/var/nix/db
# nix-shell -p sqlite
[nix-shell:/nix/var/nix/db]# sqlite3 db.sqlite ".backup 'db.bak.sqlite' "
[nix-shell:/nix/var/nix/db]# sqlite3 db.sqlite
sqlite> .output db.sql
sqlite> .dump
[nix-shell:/nix/var/nix/db]# sqlite3 db.new.sqlite < db.sql
[nix-shell:/nix/var/nix/db]# mv db.new.sqlite db.sqlite
```