Add doom-emacs using nix directly

Keep config as separate repo for rapid iteration
Restore Makefile
This commit is contained in:
Evie Litherland-Smith 2023-09-12 08:33:05 +01:00
parent 9cdc091141
commit 06ed0f1d52
4 changed files with 92 additions and 54 deletions

7
Makefile Normal file
View file

@ -0,0 +1,7 @@
.PHONY: test build
test:
sudo nixos-rebuild test --flake .
build:
sudo nixos-rebuild build --flake .

View file

@ -112,6 +112,22 @@
"type": "github" "type": "github"
} }
}, },
"doom-emacs": {
"flake": false,
"locked": {
"lastModified": 1694469381,
"narHash": "sha256-W2igPoy27chZrM8DYtnQ3d8WavrdHMYuX+Ez4DXdMZs=",
"owner": "doomemacs",
"repo": "doomemacs",
"rev": "a44e8d6bfd06e8746030eb1f2e6d3a200a2f4682",
"type": "github"
},
"original": {
"owner": "doomemacs",
"repo": "doomemacs",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -206,6 +222,7 @@
"catppuccin-hyprland": "catppuccin-hyprland", "catppuccin-hyprland": "catppuccin-hyprland",
"catppuccin-zathura": "catppuccin-zathura", "catppuccin-zathura": "catppuccin-zathura",
"catppuccin-zsh": "catppuccin-zsh", "catppuccin-zsh": "catppuccin-zsh",
"doom-emacs": "doom-emacs",
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland": "hyprland", "hyprland": "hyprland",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",

View file

@ -13,6 +13,10 @@
}; };
# Non-flake inputs # Non-flake inputs
doom-emacs = {
url = "github:doomemacs/doomemacs";
flake = false;
};
wallpapers = { wallpapers = {
url = "git+https://git.xenia.me.uk/xenia/wallpapers.git"; url = "git+https://git.xenia.me.uk/xenia/wallpapers.git";
flake = false; flake = false;

View file

@ -1,60 +1,70 @@
{ pkgs, ... }: { pkgs, inputs, ... }:
let
{ sessionVariables = {
DOOMLOCALDIR = "$HOME/.local/share/doomemacs";
DOOMPROFILELOADFILE = "$HOME/.local/share/doomemacs/profiles/load.el";
};
in {
imports = [ ../accounts/default.nix ../git/default.nix ]; imports = [ ../accounts/default.nix ../git/default.nix ];
xdg.configFile.emacs.source = inputs.doom-emacs;
systemd.user = { inherit sessionVariables; };
programs.emacs.enable = true; programs.emacs.enable = true;
home.packages = with pkgs; [ home = {
# Emacs dependencies inherit sessionVariables;
ripgrep sessionPath = [ "${inputs.doom-emacs}/bin" ];
coreutils packages = with pkgs; [
cmake # Emacs dependencies
fd ripgrep
graphviz coreutils
zip cmake
unzip fd
graphviz
zip
unzip
# Language-specific requirements # Language-specific requirements
ispell ispell
findutils findutils
sqlite sqlite
pandoc pandoc
gfortran gfortran
texlive.combined.scheme-medium texlive.combined.scheme-medium
imagemagick imagemagick
python3 python3
isort isort
python3Packages.cython python3Packages.cython
python3Packages.pyflakes python3Packages.pyflakes
python3Packages.nose python3Packages.nose
python3Packages.pytest python3Packages.pytest
nodePackages.stylelint nodePackages.stylelint
# Formatters # Formatters
nixfmt nixfmt
beautysh beautysh
black black
nodePackages.fixjson nodePackages.fixjson
fprettify fprettify
shellharden shellharden
shfmt shfmt
stylua stylua
python3Packages.mdformat python3Packages.mdformat
html-tidy html-tidy
nodePackages.js-beautify nodePackages.js-beautify
# LSP servers # LSP servers
nixd nixd
fortls fortls
shellcheck shellcheck
marksman marksman
luajitPackages.lua-lsp luajitPackages.lua-lsp
texlab texlab
nodePackages.pyright nodePackages.pyright
nodePackages.yaml-language-server nodePackages.yaml-language-server
nodePackages.bash-language-server nodePackages.bash-language-server
nodePackages.vscode-html-languageserver-bin nodePackages.vscode-html-languageserver-bin
nodePackages.vscode-css-languageserver-bin nodePackages.vscode-css-languageserver-bin
nodePackages.vscode-json-languageserver-bin nodePackages.vscode-json-languageserver-bin
nodePackages.dockerfile-language-server-nodejs nodePackages.dockerfile-language-server-nodejs
]; ];
};
} }