https://github.com/f-f/home
Versioning $HOME: NixOS configurations, dotfiles, scripts, etc.
https://github.com/f-f/home
bash dotfiles macos personal-dotfiles
Last synced: 4 months ago
JSON representation
Versioning $HOME: NixOS configurations, dotfiles, scripts, etc.
- Host: GitHub
- URL: https://github.com/f-f/home
- Owner: f-f
- License: unlicense
- Created: 2016-10-15T22:29:48.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2025-03-20T20:38:55.000Z (7 months ago)
- Last Synced: 2025-05-07T23:04:54.712Z (5 months ago)
- Topics: bash, dotfiles, macos, personal-dotfiles
- Language: Nix
- Homepage: https://ferrai.io
- Size: 1.7 MB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: .github/README.md
- License: LICENSE
Awesome Lists containing this project
README
# home
Versioning `$HOME`. Contains nix configs, dotfiles, scripts.
Config for NixOS only.
## Fresh install, NixOS
1. Do the whole NixOS install thing, and in another machine put together a basic config in the `flake.nix`
1. Clone this repo in the home folder: `git clone https://github.com/f-f/home.git ~`
1. Copy out all the content: `cd home && find . -maxdepth 1 -exec mv {} .. \;`
1. Fetch everything: `cd ~ && git submodule update --init --recursive --remote`
1. Integrate into the config for this hostname the autogenerated `hardware-configuration.nix` and `configuration.nix` files, then `nixos-switch`At this point is should be possible to ssh from another machine, so the rest can be done remotely:
1. Add the fzf module:
```bash
mkdir -p .zprezto/contrib && cd $_
git clone https://github.com/gpanders/fzf-prezto.git fzf
cd fzf
git submodule update --init
```
1. Make a new ssh key for github: `ssh-keygen -t ed25519 -C "$USER+github@$(hostname)" -f github`, add it as deploy key here
1. Replace this repo remote from http to git: `git remote set-url origin git@github.com:f-f/home.git`### On macOS
It's a little more involved to bootstrap Nix on macOS, but it can be done. After cloning the stuff:
```bash
# In case of M1
softwareupdate --install-rosetta# Install brew and nix
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
curl -L https://nixos.org/nix/install | sh# Set hostname
export NEW_HOSTNAME=foo
sudo scutil --set HostName $NEW_HOSTNAME
sudo scutil --set LocalHostName $NEW_HOSTNAME
sudo scutil --set ComputerName $NEW_HOSTNAME# At this point, edit nixos-config/flake.nix to add the new machine
# Then:
nixos-switch# Note: it will complain at first that the nix command requires experimental features, so that will require executing the script by hand adding the right flags, but after that it's all fine
```Useful reads:
- https://xyno.space/post/nix-darwin-introduction
- https://gist.github.com/jmatsushita/5c50ef14b4b96cb24ae5268dab613050
- https://github.com/srstrong/nix-env
- https://daiderd.com/nix-darwin/manual/index.html