2024-03-23 00:13:56 +05:30
|
|
|
{ config, lib, pkgs-emacs, pkgs-stable, userSettings, systemSettings,
|
2024-04-03 09:43:28 +05:30
|
|
|
org-nursery, org-yaap, org-side-tree, org-timeblock, org-krita, phscroll, mini-frame, ... }:
|
2023-06-04 21:22:24 +05:30
|
|
|
let
|
2024-01-19 03:06:52 +05:30
|
|
|
themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../../themes"+("/"+userSettings.theme)+"/polarity.txt"));
|
2023-06-23 01:23:10 +05:30
|
|
|
dashboardLogo = ./. + "/nix-" + themePolarity + ".png";
|
2023-06-04 21:22:24 +05:30
|
|
|
in
|
2023-05-16 04:48:59 +05:30
|
|
|
{
|
2024-03-23 00:13:56 +05:30
|
|
|
imports = [
|
|
|
|
../git/git.nix
|
|
|
|
../../shell/sh.nix
|
|
|
|
../../shell/cli-collection.nix
|
|
|
|
];
|
|
|
|
|
2023-05-16 04:48:59 +05:30
|
|
|
programs.doom-emacs = {
|
|
|
|
enable = true;
|
2024-03-23 00:13:56 +05:30
|
|
|
emacsPackage = pkgs-emacs.emacs29-pgtk;
|
2023-05-16 04:48:59 +05:30
|
|
|
doomPrivateDir = ./.;
|
2023-06-15 01:18:04 +05:30
|
|
|
# This block from https://github.com/znewman01/dotfiles/blob/be9f3a24c517a4ff345f213bf1cf7633713c9278/emacs/default.nix#L12-L34
|
|
|
|
# Only init/packages so we only rebuild when those change.
|
|
|
|
doomPackageDir = let
|
|
|
|
filteredPath = builtins.path {
|
|
|
|
path = ./.;
|
|
|
|
name = "doom-private-dir-filtered";
|
|
|
|
filter = path: type:
|
|
|
|
builtins.elem (baseNameOf path) [ "init.el" "packages.el" ];
|
|
|
|
};
|
2024-03-23 00:13:56 +05:30
|
|
|
in pkgs-emacs.linkFarm "doom-packages-dir" [
|
2023-06-15 01:18:04 +05:30
|
|
|
{
|
|
|
|
name = "init.el";
|
|
|
|
path = "${filteredPath}/init.el";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "packages.el";
|
|
|
|
path = "${filteredPath}/packages.el";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "config.el";
|
2024-03-23 00:13:56 +05:30
|
|
|
path = pkgs-emacs.emptyFile;
|
2023-06-15 01:18:04 +05:30
|
|
|
}
|
|
|
|
];
|
|
|
|
# End block
|
2023-05-16 04:48:59 +05:30
|
|
|
};
|
2023-06-11 09:34:03 +05:30
|
|
|
|
2023-05-16 04:48:59 +05:30
|
|
|
home.file.".emacs.d/themes/doom-stylix-theme.el".source = config.lib.stylix.colors {
|
|
|
|
template = builtins.readFile ./themes/doom-stylix-theme.el.mustache;
|
|
|
|
extension = ".el";
|
|
|
|
};
|
2023-06-11 09:34:03 +05:30
|
|
|
|
2024-03-23 00:13:56 +05:30
|
|
|
home.packages = (with pkgs-emacs; [
|
2023-11-06 03:50:52 +05:30
|
|
|
nil
|
|
|
|
nixfmt
|
|
|
|
file
|
|
|
|
wmctrl
|
|
|
|
jshon
|
|
|
|
aria
|
|
|
|
hledger
|
|
|
|
hunspell hunspellDicts.en_US-large
|
2024-03-23 00:13:56 +05:30
|
|
|
(pkgs-emacs.mu.override { emacs = emacs29-pgtk; })
|
2023-11-06 03:50:52 +05:30
|
|
|
emacsPackages.mu4e
|
|
|
|
isync
|
|
|
|
msmtp
|
|
|
|
(python3.withPackages (p: with p; [
|
|
|
|
pandas
|
|
|
|
requests
|
2024-02-18 20:53:57 +05:30
|
|
|
epc lxml
|
2023-11-06 03:50:52 +05:30
|
|
|
pysocks
|
2024-02-04 03:21:01 +05:30
|
|
|
pymupdf
|
2023-11-06 03:50:52 +05:30
|
|
|
markdown
|
|
|
|
]))
|
2024-02-18 20:53:57 +05:30
|
|
|
]) ++ (with pkgs-stable; [
|
|
|
|
nodejs
|
|
|
|
nodePackages.mermaid-cli
|
|
|
|
]);
|
2023-12-22 07:56:08 +05:30
|
|
|
|
2023-11-06 03:50:52 +05:30
|
|
|
services.mbsync = {
|
|
|
|
enable = true;
|
2024-03-23 00:13:56 +05:30
|
|
|
package = pkgs-stable.isync;
|
2023-11-06 03:50:52 +05:30
|
|
|
frequency = "*:0/5";
|
|
|
|
};
|
2023-06-11 09:34:03 +05:30
|
|
|
|
2023-09-23 22:24:14 +05:30
|
|
|
home.file.".emacs.d/org-yaap" = {
|
|
|
|
source = "${org-yaap}";
|
|
|
|
recursive = true;
|
|
|
|
};
|
|
|
|
|
2023-10-06 01:27:44 +05:30
|
|
|
home.file.".emacs.d/org-side-tree" = {
|
|
|
|
source = "${org-side-tree}";
|
|
|
|
recursive = true;
|
|
|
|
};
|
|
|
|
|
2023-10-13 07:19:37 +05:30
|
|
|
home.file.".emacs.d/org-timeblock" = {
|
|
|
|
source = "${org-timeblock}";
|
|
|
|
recursive = true;
|
|
|
|
};
|
|
|
|
|
2023-06-04 09:42:31 +05:30
|
|
|
home.file.".emacs.d/org-nursery" = {
|
|
|
|
source = "${org-nursery}";
|
|
|
|
};
|
2023-10-13 07:19:37 +05:30
|
|
|
|
2024-04-03 09:43:28 +05:30
|
|
|
home.file.".emacs.d/org-krita" = {
|
|
|
|
source = "${org-krita}";
|
|
|
|
};
|
|
|
|
|
2023-06-23 01:23:10 +05:30
|
|
|
home.file.".emacs.d/dashboard-logo.png".source = dashboardLogo;
|
2023-06-16 04:57:06 +05:30
|
|
|
home.file.".emacs.d/scripts/copy-link-or-file/copy-link-or-file-to-clipboard.sh" = {
|
|
|
|
source = ./scripts/copy-link-or-file/copy-link-or-file-to-clipboard.sh;
|
|
|
|
executable = true;
|
|
|
|
};
|
2023-10-13 07:19:37 +05:30
|
|
|
|
2023-08-27 02:28:45 +05:30
|
|
|
home.file.".emacs.d/phscroll" = {
|
|
|
|
source = "${phscroll}";
|
|
|
|
};
|
2023-10-13 07:19:37 +05:30
|
|
|
|
2024-04-02 07:39:55 +05:30
|
|
|
home.file.".emacs.d/mini-frame" = {
|
|
|
|
source = "${mini-frame}";
|
|
|
|
};
|
|
|
|
|
2023-08-27 19:51:09 +05:30
|
|
|
home.file.".emacs.d/system-vars.el".text = ''
|
|
|
|
;;; ~/.emacs.d/config.el -*- lexical-binding: t; -*-
|
|
|
|
|
|
|
|
;; Import relevant variables from flake into emacs
|
|
|
|
|
2024-01-19 03:06:52 +05:30
|
|
|
(setq user-full-name "''+userSettings.name+''") ; name
|
|
|
|
(setq user-username "''+userSettings.username+''") ; username
|
|
|
|
(setq user-mail-address "''+userSettings.email+''") ; email
|
|
|
|
(setq user-home-directory "/home/''+userSettings.username+''") ; absolute path to home directory as string
|
|
|
|
(setq user-default-roam-dir "''+userSettings.defaultRoamDir+''") ; absolute path to home directory as string
|
|
|
|
(setq system-nix-profile "''+systemSettings.profile+''") ; what profile am I using?
|
|
|
|
(setq system-wm-type "''+userSettings.wmType+''") ; wayland or x11?
|
|
|
|
(setq doom-font (font-spec :family "''+userSettings.font+''" :size 20)) ; import font
|
|
|
|
(setq dotfiles-dir "''+userSettings.dotfilesDir+''") ; import location of dotfiles directory
|
2023-08-27 19:51:09 +05:30
|
|
|
'';
|
2023-05-16 04:48:59 +05:30
|
|
|
}
|