dotfiles

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

commit a93bd1f726cd904a1b08e8ddbab7ec1a533fdb5c
parent 8ee6a49030e98149cd55e98a766992ff93c91a37
Author: Anders Hedman <anders.hedman01@gmail.com>
Date:   Thu, 24 Oct 2024 11:43:19 +0200

doom: add flake for doom test/dev env

Diffstat:
A.doom.d/flake.lock | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.doom.d/flake.nix | 47+++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 108 insertions(+), 0 deletions(-)

diff --git a/.doom.d/flake.lock b/.doom.d/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1729449015, + "narHash": "sha256-Gf04dXB0n4q0A9G5nTGH3zuMGr6jtJppqdeljxua1fo=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "89172919243df199fe237ba0f776c3e3e3d72367", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/.doom.d/flake.nix b/.doom.d/flake.nix @@ -0,0 +1,47 @@ +{ + description = "Doom Emacs Test/Dev Environment"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = + { + self, + nixpkgs, + flake-utils, + ... + }@inputs: + flake-utils.lib.eachDefaultSystem ( + system: + let + pkgs = nixpkgs.legacyPackages.${system}; + homedir = "/home/anders"; + emacsdir = "${homedir}/tmp/emacsdev"; + doomlocaldir = "${emacsdir}/.local"; + doomdir = "${homedir}/Repos/dotfiles/.doom.d"; + in + { + devShells.default = pkgs.mkShell { + packages = with pkgs; [ + emacs + git + ripgrep + ]; + + EMACSDIR = emacsdir; + DOOMLOCALDIR = doomlocaldir; + DOOMDIR = doomdir; + + shellHook = '' + export PS1="$PS1""emacs dev -> " + export PATH="$PATH":"$EMACSDIR"/bin + alias emacs="emacs --init-directory=$EMACSDIR" + ''; + }; + + } + + ); +}