~idmyn/dotfiles

e96041f6e1b948413950a2763bc4d1d379dfaa01 — David Mynors a month ago 85e9d1f
Add nix config
M README.md => README.md +11 -0
@@ 15,6 15,17 @@ read more of [my thoughts about
backups](https://notes.davidmyno.rs/backups.html) in [my public
notes](https://sr.ht/~idmyn/notes.davidmyno.rs/).

## Nix

[Nix](https://nixos.org/) is a purely functional package manager which I don't
yet totally understand. You're welcome to read [my
notes on it](https://notes.davidmyno.rs/nix.html) for more info/resources/tips,
but for the purposes of this Readme you just need to know that I have [a nix
config for macOS](nix/darwin-configuration.nix) which instructs
[nix-darwin](https://github.com/LnL7/nix-darwin) to setup/install the
nix-related programs like [lorri](https://github.com/target/lorri) which I want
available system-wide.

## Emacs

My current emacs setup consists of a base emacs install of [homebrew's

M emacs/.doom.d/init.el => emacs/.doom.d/init.el +1 -1
@@ 134,7 134,7 @@
       ;;lua               ; one-based indices? one-based indices
       (markdown +grip)          ; writing docs for people to ignore
       ;;nim               ; python + lisp at the speed of c
       ;;nix               ; I hereby declare "nix geht mehr!"
       nix               ; I hereby declare "nix geht mehr!"
       ;;ocaml             ; an objective camel
       org              ; organize your plain life in plain text
        ;;+hugo            ; use Emacs for hugo blogging

M install.conf.yaml => install.conf.yaml +1 -0
@@ 11,6 11,7 @@
- link:
    ~/.backup.sh: backup.sh
    ~/.doom.d: emacs/.doom.d
    ~/.nixpkgs/darwin-configuration.nix: nix/darwin-configuration.nix
    ~/.finicky.js: macOS/finicky/.finicky.js
    ~/.config/phoenix/phoenix.js: macOS/phoenix/phoenix.js
    ~/.config/karabiner.edn: macOS/karabiner/karabiner.edn

A nix/darwin-configuration.nix => nix/darwin-configuration.nix +17 -0
@@ 0,0 1,17 @@
{ config, pkgs, ... }:

{
  environment.systemPackages = with pkgs; [
    direnv
    niv
  ];

  services.lorri.enable = true; # installs automatically

  # Auto upgrade nix package
  nix.package = pkgs.nix;

  # Used for backwards compatibility, please read the changelog before changing.
  # $ darwin-rebuild changelog
  system.stateVersion = 4;
}

M shell/.zshrc => shell/.zshrc +2 -0
@@ 9,3 9,5 @@ PROMPT="
setopt autocd
alias q="exit"
alias ls="echo; ls"

if [ -e /Users/david/.nix-profile/etc/profile.d/nix.sh ]; then . /Users/david/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer

M shell/elvish/lib/nix.elv => shell/elvish/lib/nix.elv +2 -1
@@ 1,8 1,9 @@
E:NIX_LINK = $E:HOME/.nix-profile
E:NIX_PATH = $E:HOME/.nix-defexpr/channels
E:NIX_PATH = $E:HOME/.nix-defexpr/channels:darwin-config=$E:HOME/.nixpkgs/darwin-configuration.nix
E:NIX_PROFILES = "/nix/var/nix/profiles/default "$E:NIX_LINK
E:NIX_SSL_CERT_FILE = $E:NIX_LINK/etc/ssl/certs/ca-bundle.crt
paths = [
  $E:NIX_LINK/bin
  /run/current-system/sw/bin
  $@paths
]