2024-10-05 16:39:27 +01:00
|
|
|
{ config, pkgs, ... }:
|
2024-10-05 12:38:24 +01:00
|
|
|
{
|
2024-10-05 16:39:27 +01:00
|
|
|
imports = [
|
2024-11-14 08:43:27 +00:00
|
|
|
../shell/default.nix
|
|
|
|
../shell/git.nix
|
|
|
|
../gpg/default.nix
|
2024-10-05 16:39:27 +01:00
|
|
|
];
|
2024-09-19 08:05:48 +01:00
|
|
|
stylix.targets.emacs.enable = false;
|
2024-10-22 11:36:21 +01:00
|
|
|
services.emacs = {
|
|
|
|
enable = true;
|
|
|
|
package = config.programs.emacs.finalPackage;
|
|
|
|
defaultEditor = true;
|
|
|
|
client.enable = true;
|
|
|
|
socketActivation.enable = true;
|
|
|
|
startWithUserSession = false;
|
2024-07-03 07:15:39 +01:00
|
|
|
};
|
2024-10-05 16:39:27 +01:00
|
|
|
programs.emacs = {
|
|
|
|
# Clone emacs config from https://git.xenia.me.uk/pixelifytica/emacs.git
|
|
|
|
enable = true;
|
2024-11-14 13:50:55 +00:00
|
|
|
package = pkgs.emacs29.override {
|
|
|
|
withImageMagick = true;
|
|
|
|
withPgtk = true;
|
|
|
|
};
|
2024-10-05 16:39:27 +01:00
|
|
|
extraConfig =
|
|
|
|
let
|
|
|
|
fixed-font-family = "${config.stylix.fonts.monospace.name}";
|
|
|
|
variable-font-family = "${config.stylix.fonts.sansSerif.name}";
|
|
|
|
font-height = builtins.toString (
|
|
|
|
builtins.floor (builtins.mul config.stylix.fonts.sizes.applications 10)
|
|
|
|
);
|
|
|
|
custom-theme-name = "nix";
|
|
|
|
custom-theme = pkgs.writeTextFile {
|
|
|
|
name = "custom-emacs-theme";
|
|
|
|
destination = "/${custom-theme-name}-theme.el";
|
|
|
|
text = ''
|
|
|
|
(deftheme ${custom-theme-name}
|
|
|
|
"Use Nix customised fonts for main faces")
|
2024-07-03 07:15:39 +01:00
|
|
|
|
2024-10-05 16:39:27 +01:00
|
|
|
(custom-theme-set-variables
|
|
|
|
'${custom-theme-name}
|
|
|
|
'(menu-bar-mode nil))
|
2024-07-03 07:15:39 +01:00
|
|
|
|
2024-10-05 16:39:27 +01:00
|
|
|
(custom-theme-set-faces
|
|
|
|
'${custom-theme-name}
|
|
|
|
'(default ((t (:family "${fixed-font-family}" :height ${font-height}))))
|
|
|
|
'(fixed-pitch ((t (:family "${fixed-font-family}"))))
|
|
|
|
'(fixed-pitch-serif ((t (:family "${fixed-font-family}"))))
|
|
|
|
'(variable-pitch ((t (:family "${variable-font-family}")))))
|
2024-07-03 07:15:39 +01:00
|
|
|
|
2024-10-05 16:39:27 +01:00
|
|
|
(provide-theme '${custom-theme-name})
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
custom-theme-hash = builtins.hashFile "sha256" "${custom-theme}/${custom-theme-name}-theme.el";
|
|
|
|
in
|
|
|
|
''
|
|
|
|
(add-to-list 'custom-theme-load-path "${custom-theme}")
|
|
|
|
(add-to-list 'custom-safe-themes "${custom-theme-hash}")
|
|
|
|
(load-theme '${custom-theme-name})
|
|
|
|
'';
|
|
|
|
extraPackages =
|
|
|
|
epkgs: with epkgs; [
|
|
|
|
treesit-grammars.with-all-grammars
|
|
|
|
mu4e
|
|
|
|
emacsql-sqlite
|
|
|
|
];
|
2024-07-03 07:15:39 +01:00
|
|
|
};
|
|
|
|
home.packages = with pkgs; [
|
2024-07-24 08:25:37 +01:00
|
|
|
# Plugin requirements
|
|
|
|
gcc
|
2024-07-03 07:15:39 +01:00
|
|
|
sqlite
|
2024-11-14 13:50:55 +00:00
|
|
|
languagetool
|
|
|
|
wordnet
|
2024-07-03 07:15:39 +01:00
|
|
|
pandoc
|
|
|
|
ghostscript
|
|
|
|
poppler_utils
|
2024-11-14 13:50:55 +00:00
|
|
|
graphviz-nox
|
2024-07-03 07:15:39 +01:00
|
|
|
|
|
|
|
# Customised LaTeX install
|
2024-07-30 15:04:58 +01:00
|
|
|
(texlive.combine {
|
|
|
|
inherit (texlive)
|
|
|
|
scheme-medium
|
|
|
|
dvisvgm
|
|
|
|
dvipng
|
|
|
|
wrapfig
|
|
|
|
amsmath
|
|
|
|
ulem
|
|
|
|
hyperref
|
|
|
|
capt-of
|
2024-09-11 11:51:35 +01:00
|
|
|
listings
|
2024-10-31 13:41:34 +00:00
|
|
|
bera
|
2024-07-30 15:04:58 +01:00
|
|
|
;
|
2024-10-31 13:41:34 +00:00
|
|
|
latex-beamer-ukaea.pkgs = [ (callPackage ./texlive/latex-beamer-ukaea/default.nix { }) ];
|
2024-07-30 15:04:58 +01:00
|
|
|
})
|
2024-07-03 07:15:39 +01:00
|
|
|
|
|
|
|
# Development tools
|
|
|
|
## Code screenshots
|
|
|
|
silicon
|
2024-07-29 14:12:25 +01:00
|
|
|
|
2024-07-29 11:29:37 +01:00
|
|
|
## Python Environments
|
|
|
|
poetry
|
2024-07-03 07:15:39 +01:00
|
|
|
|
|
|
|
## Linters
|
|
|
|
shellcheck
|
|
|
|
yamllint
|
2024-07-26 11:44:58 +01:00
|
|
|
ruff
|
2024-07-03 07:15:39 +01:00
|
|
|
|
|
|
|
## Formatters
|
2024-07-30 15:04:58 +01:00
|
|
|
nixfmt-rfc-style
|
2024-07-03 07:15:39 +01:00
|
|
|
shfmt
|
2024-07-26 11:44:58 +01:00
|
|
|
stylua
|
2024-07-03 07:15:39 +01:00
|
|
|
nodePackages.prettier
|
2024-09-23 10:17:24 +01:00
|
|
|
nodePackages.prettier-plugin-toml
|
2024-07-03 07:15:39 +01:00
|
|
|
|
|
|
|
## Language servers
|
2024-07-30 15:04:58 +01:00
|
|
|
nixd
|
2024-07-03 07:15:39 +01:00
|
|
|
lua-language-server
|
2024-07-15 06:58:00 +01:00
|
|
|
|
|
|
|
## Interpreters
|
2024-07-30 15:04:58 +01:00
|
|
|
(python3.withPackages (
|
|
|
|
ps: with ps; [
|
|
|
|
tkinter
|
2024-10-23 16:08:00 +01:00
|
|
|
python-lsp-server
|
2024-11-11 16:10:14 +00:00
|
|
|
pylsp-rope
|
|
|
|
rope
|
2024-10-23 16:08:00 +01:00
|
|
|
mypy
|
2024-07-30 15:04:58 +01:00
|
|
|
numpy
|
|
|
|
scipy
|
|
|
|
xarray
|
|
|
|
matplotlib
|
|
|
|
]
|
|
|
|
))
|
|
|
|
(luajit.withPackages (ps: [ (ps.callPackage ./luarocks/scilua.nix { }) ]))
|
2024-07-03 07:15:39 +01:00
|
|
|
];
|
2024-07-15 06:58:00 +01:00
|
|
|
xdg.configFile = {
|
|
|
|
"ruff/pyproject.toml".source = ./ruff.toml;
|
|
|
|
"pypoetry/config.toml".source = ./pypoetry.toml;
|
|
|
|
};
|
2024-07-03 07:15:39 +01:00
|
|
|
}
|