Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

JesusMtnez/dotfiles

Repository files navigation

JesusMtnez's dotfiles

using nix to rule them all

Built with nix MIT LICENSE

Machines

Name OS DE WM Use
albus NixOS 23.11 Gnome - Personal
ron macOS 14.1 - - Personal
severus macOS 12.6 - - Personal

Installation

This dotfiles are manage using nix and home-manager.

NixOS setup

  1. Clone the repository and go inside the folder
nix run --extra-experimental-features nix-command --extra-experimental-features flakes github:nixos/nixpkgs#git -- clone [email protected]:JesusMtnez/dotfiles $HOME/.dotfiles
  1. Switch to $HOSTNAME flake.
nixos-rebuild switch --use-remote-sudo --flakes $HOME/.dotfiles/.

MacOS setup

Before attempting to use this dotfiles in macOS systems, we need to:

  1. Install Command Line Tools (includes git)
xcode-select --install
  1. Install homebrew using its latest pkg.
# Setup brew in PATH
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> $HOME/.zprofile
  1. Install nix using DeterminateSystems pkg.
  1. Setup nix-darwin applying the flake for the first time.
nix run nix-darwin -- switch --flake $HOME/.dotfiles/.
  1. Switch to $HOSTNAME flake.
# 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