To get started on a new server:
- Install nix
- Back up and remove your existing
.emacs.d,.bashrc, and.profile - Clone this repository.
- Run
nix-build switch.nix -A desktop -o switchornix-build switch.nix -A server -o switch. - Run
./switch.
If you
build it this way, you can edit the configuration and just re-run
switch to build and switch to a new profile. Also, several files
such as the emacs custom-file are linked directly to their editable
versions so you can edit them directly without rebuilding each time.
To copy a config to another server without having to check out the repository there:
- Add yourself to trusted-users in nix.conf on the server.
- Run
./copy.sh <hostname>. - Log into the server and run
./switch.
let
mynix = import (fetchTarball {
url = "https://github.com/pdg137/config/archive/master.tar.gz";
sha256 = ""; # update as necessary
} + "/defs.nix");
pkgs = mynix.pkgs;
in
mynix.mkBuildableShell {
name = "shell";
buildInputs = [
# put packages here
];
}