dotfiles

andersuno dotfiles
git clone git://git.andersuno.nu/dotfiles.git
Log | Files | Refs | README

flake.nix (1043B)


      1 {
      2   description = "Doom Emacs Test/Dev Environment";
      3 
      4   inputs = {
      5     nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
      6     flake-utils.url = "github:numtide/flake-utils";
      7   };
      8 
      9   outputs =
     10     {
     11       self,
     12       nixpkgs,
     13       flake-utils,
     14       ...
     15     }@inputs:
     16     flake-utils.lib.eachDefaultSystem (
     17       system:
     18       let
     19         pkgs = nixpkgs.legacyPackages.${system};
     20         homedir = "/home/anders";
     21         emacsdir = "${homedir}/tmp/emacsdev";
     22         doomlocaldir = "${emacsdir}/.local";
     23         doomdir = "${homedir}/Repos/dotfiles/.doom.d";
     24       in
     25       {
     26         devShells.default = pkgs.mkShell {
     27           packages = with pkgs; [
     28             emacs
     29             git
     30             ripgrep
     31           ];
     32 
     33           EMACSDIR = emacsdir;
     34           DOOMLOCALDIR = doomlocaldir;
     35           DOOMDIR = doomdir;
     36 
     37           shellHook = ''
     38             export PS1="$PS1""emacs dev -> "
     39             export PATH="$PATH":"$EMACSDIR"/bin
     40             alias emacs="emacs --init-directory=$EMACSDIR"
     41           '';
     42         };
     43 
     44       }
     45 
     46     );
     47 }