Git Product home page Git Product logo

home's Introduction

home

Versioning $HOME. Contains nix configs, dotfiles, scripts.

Config for NixOS only.

Fresh install, wat do

  1. Clone this repo in the home folder: git clone https://github.com/f-f/home.git ~
  2. Fetch everything: cd ~ && git submodule update --init --recursive --remote
  3. Add the fzf module:
    mkdir -p .zprezto/contrib && cd $_
    git clone https://github.com/gpanders/fzf-prezto.git fzf
    cd fzf
    git submodule update --init
  4. Write down the config for the new machine, start from the example: cd ~/nixos-config && cp local-example.nix $(hostname).nix, and integrate with what's in /etc/nixos/configuration.nix
  5. Import it as a local configuration: echo "import ./$(hostname).nix" > local.nix
  6. mv /etc/nixos/hardware-configuration.nix ~
  7. Add channels:
sudo nix-channel --add http://nixos.org/channels/nixos-21.05 nixos
sudo nix-channel --add http://nixos.org/channels/nixos-unstable nixos-unstable
sudo nix-channel --update

Then: nixos-switch

Next:

  1. Make a new ssh key for github: ssh-keygen -t ed25519 -C "$USER+github@$(hostname)" -f github, add it as deploy key here
  2. Replace this repo remote from http to git: git remote set-url origin [email protected]:f-f/home.git

On macOS

It's a little harder to bootstrap Nix on macOS, but it can be done. After cloning the stuff:

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

TODO: refactor readme. With the flakes it's not quite the right approach Reference this link: https://colinramsay.co.uk/2021/10/19/migrating-a-nixos-install-to-flakes.html

home's People

Contributors

f-f avatar fabrizio-cn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

home's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.