Skip to content

Latest commit

 

History

History
251 lines (179 loc) · 6.23 KB

README.md

File metadata and controls

251 lines (179 loc) · 6.23 KB

NixOS config for my hosts

Setup

  1. Enable nix flakes:

Add the following to your /etc/nixos/configuration.nix:

{ pkgs, ... }: {
  nix = {
    package = pkgs.nixUnstable;
    extraOptions = ''
      experimental-features = nix-command flakes
    '';
   };
}

Switch:

sudo nixos-rebuild switch
  1. Backup your original config
sudo mv /etc/nixos /etc/nixos-orig
  1. Clone this repository and create a symlink to /etc/nixos
mkdir -p ~/projects/personal && cd ~/projects/personal
git clone --recurse-submodules -j8 --depth=1 https://github.com/vyorkin/nixos-config
ln -sf nixos-config /etc/nixos
  1. (Optional) Add your new host configuration files to hosts/yourhost/* and add the corresponding target to Makefile.

  2. Build and deploy the NixOS host:

make setup/yourhost

Manual steps

Install zplug:

git clone https://github.com/zplug/zplug.git ~/.zplug

Setup tmux config as described here.

Layout

  • Makefile - Contains targets to build host systems
  • flakes.nix - Metadata describing this repository
  • hosts/ - Host specific configurations
  • modules/ - Package configurations
  • profiles/ - Profiles (server, desktop)
  • packages/ - Local/custom derivations

Haskell

Tools:

Nix

Lorri: https://github.com/target/lorri/blob/master/contrib/daemon.md

Vim/NeoVim

OCaml

Note that you need to run:

:execute "helptags " . substitute(system('opam config var share'),'\n$','','''') .  "/merlin/vim/doc"

to manually to update the documentation

NodeJS

Enable the workaround to be able to install node packages globally. Make sure to create the following directory:

$ mkdir ~/.npm-packages

This directory is used in the ~/.npmrc.

Rust

$ rustup toolchain add nightly
$ rustup default nightly
$ rustup component add rust-src
$ rustup +nightly component add rust-analyzer-preview
$ git clone https://github.com/rust-analyzer/rust-analyzer.git && cd rust-analyzer
$ cargo xtask install --server
$ rustup component add rls
$ cargo install bingrep
$ cargo install --locker broot
$ cargo install rusty-tags
$ cargo install cargo-udeps && cargo +nightly udeps
$ rustup component add rustfmt-preview --toolchain nightly
$ cargo +nightly install racer
$ cargo install bootimage cargo-xbuild
$ cargo install elba hunter navi
$ cargo install evcxr_repl
$ cargo install cargo-watch cargo-edit cargo-nextest cargo-modules cargo-audit
$ cargo install cargo-tarpaulin cargo-make cargo-release

Run boot at least one time.

Add ~/.cargo/env:

#!/bin/sh
# rustup shell setup
# affix colons on either side of $PATH to simplify matching
case ":${PATH}:" in
    *:"$HOME/.cargo/bin":*)
        ;;
    *)
        # Prepending path in case a system-installed rustc needs to be overridden
        export PATH="$HOME/.cargo/bin:$PATH"
        ;;
esac

Go

  • gitbatch - allows manage your git repositories in one place
$ go get -u github.com/isacikgoz/gitbatch/cmd/gitbatch

TypeScript

$ npm i -g typescript typescript-formatter microsoft@rush npm-check-updates

Why3

$ why3 config --detect

MiniZinc

Edit the gecode.msc and update the fzn-gecode. To find the path:

$ readlink -f $(which fzn-gecode)

OCaml

Remove OCAML_TOPLEVEL_PATH from ~/.opam/opam-init/variables.sh

opam repo add beta https://github.com/ocaml/ocaml-beta-repository.git

Install tools and common/core packages:

opam install tuareg merlin ocp-indent odoc
opam pin add ocaml-lsp-server https://github.com/ocaml/ocaml-lsp.git
opam install ocaml-lsp-server

opam install core core_bench stdio ppx_deriving ppx_inline_test ppx_expect
opam install fmt cmdliner lwt js_of_ocaml logs textutils
opam install alcotest qcheck qcheck-alcotest

Coq

opam repo add coq-released https://coq.inria.fr/opam/released
opam update

GNOME

Tweaks:

  • Set a dark theme, use Numix icon & cursor themes
  • Activate and setup extensions you like

Firefox

Sign-in and (optionally) install these extensions:

Ethereum

https://github.com/dapphub/dapptools

npm i -g solhint

GitHub

  • gist --login

Other

  • tldr --update

Inspired by