That’s the thing, I’m not intentionnaly getting Org in any other way than by using the built-in package. I most probably call elpa somewhere where it escaped my vigilance but can’t figure out where 
Here’s home.nix:
{ config, pkgs, lib, inputs, ... }:
let
tex = (pkgs.texliveBasic.withPackages (
ps: with ps; [
dvisvgm dvipng # for preview and export as html
wrapfig amsmath ulem hyperref capt-of beamer
fontspec
#(setq org-latex-compiler "lualatex")
#(setq org-preview-latex-default-process 'dvisvgm)
]));
in
{ home.username = "jeremy";
home.homeDirectory = "/home/jeremy";
home.stateVersion = "25.05";
imports = [
./programs/vscodium.nix
./programs/git.nix
./programs/kate.nix
./programs/konsole.nix
./programs/nvim.nix
./programs/plasma.nix
./programs/zsh.nix
./programs/ssh.nix
./programs/emacs/emacs.nix
./programs/zed.nix
./services/syncthing.nix
];
home.packages = with pkgs; [
# very long list of packages here, including tex
];
# Let home Manager install and manage itself.
programs.home-manager.enable = true;
}
programs/emacs/emacs.nix:
{ config, pkgs, lib, ... }:
{ programs.emacs = {
enable = true;
package = pkgs.emacs-gtk;
extraConfig = builtins.readFile ./init.el;
extraPackages = epkgs: [
epkgs.dash
epkgs.dashboard
epkgs.discover
epkgs.doom-themes
epkgs.emacsql
epkgs.f
epkgs.forge
epkgs.highlight-indent-guides
epkgs.magit
epkgs.magit-section
epkgs.markdown-mode
epkgs.mastodon
epkgs.neotree
epkgs.nerd-icons
epkgs.nix-mode
epkgs.org-journal
epkgs.org-roam
epkgs.org-roam-ui
epkgs.page-break-lines
epkgs.projectile
epkgs.s
epkgs.yaml
epkgs.zotxt
];
};
}
flake.nix:
{description = "Config NixOS";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
home-manager = {
url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "nixpkgs";
};
plasma-manager = {
url = "github:nix-community/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
audio = {
url = "github:polygon/audio.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs@{
nixpkgs,
home-manager,
plasma-manager,
audio,
...
}:
{ nixosConfigurations = {
fixable = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
{
nixpkgs.overlays = [ audio.overlays.default ];
}
home-manager.nixosModules.home-manager
{
home-manager = {
users.jeremy = import ./home.nix;
useGlobalPkgs = true;
useUserPackages = true;
sharedModules = [
plasma-manager.homeManagerModules.plasma-manager
];
backupFileExtension = "bak2";
};
}
];
specialArgs = { inherit inputs; };
};
};
};
}
flake.lock:
{
"nodes": {
"audio": {
"inputs": {
"nix-buildproxy": "nix-buildproxy",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1763326960,
"narHash": "sha256-NjvypWkSUWeDTOStRRFoOG14q7JHsmX1feCWO1aSvOQ=",
"owner": "polygon",
"repo": "audio.nix",
"rev": "24bc1becad1105dad1a543f528919339144f3bc5",
"type": "github"
},
"original": {
"owner": "polygon",
"repo": "audio.nix",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1763992789,
"narHash": "sha256-WHkdBlw6oyxXIra/vQPYLtqY+3G8dUVZM8bEXk0t8x4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "44831a7eaba4360fb81f2acc5ea6de5fde90aaa3",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-25.05",
"repo": "home-manager",
"type": "github"
}
},
"nix-buildproxy": {
"inputs": {
"nixpkgs": [
"audio",
"nixpkgs"
]
},
"locked": {
"lastModified": 1708455753,
"narHash": "sha256-qP79WfPiTl92KrZkmvacba9Xas4WwSFln5DjkP2Q/Lg=",
"owner": "polygon",
"repo": "nix-buildproxy",
"rev": "77d486cb4b0458cb4c4a296c3140f7a6c36ab3e6",
"type": "github"
},
"original": {
"owner": "polygon",
"ref": "v0.1.0",
"repo": "nix-buildproxy",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1763948260,
"narHash": "sha256-dY9qLD0H0zOUgU3vWacPY6Qc421BeQAfm8kBuBtPVE0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1c8ba8d3f7634acac4a2094eef7c32ad9106532c",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}
},
"plasma-manager": {
"inputs": {
"home-manager": [
"home-manager"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1763909441,
"narHash": "sha256-56LwV51TX/FhgX+5LCG6akQ5KrOWuKgcJa+eUsRMxsc=",
"owner": "nix-community",
"repo": "plasma-manager",
"rev": "b24ed4b272256dfc1cc2291f89a9821d5f9e14b4",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "plasma-manager",
"type": "github"
}
},
"root": {
"inputs": {
"audio": "audio",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"plasma-manager": "plasma-manager"
}
}
},
"root": "root",
"version": 7
}
and programs/emacs.init.el, because why not:
;;; init.el --- Config Emacs -*- lexical-binding: t; -*-
;; -----------------------
;; Environnement
;; -----------------------
(setq tool-bar-position 'left) ;; barre d'outils Ă gauche
(tool-bar-mode 1) ;; réactive la barre d'outils pour être sûr
(setq inhibit-startup-screen t) ;; pas d’écran d’accueil
(savehist-mode 1) ;; historise minibuffer
(recentf-mode 1) ;; fichiers récents
(electric-pair-mode 1) ;; autocomplète (), {}, "", etc.
(global-set-key (kbd "C-c l") #'org-store-link)
(global-set-key (kbd "C-c a") #'org-agenda)
(global-set-key (kbd "C-c c") #'org-capture)
;; (menu-bar-mode -1) ;; masque la barre de menus
;; (tool-bar-mode -1) ;; masque la barre d'outils
;; (scroll-bar-mode -1) ;; masque la barre de défilement
(global-auto-revert-mode 1) ;; active l'auto-revert pour garder les bufffers Ă jour (cf. syncthing)
;; (auto-save-visited-mode 1) ;; auto-sauvegarde des fichiers visités toutes les 5 secondes
;; Dashboard au démarrage
(use-package dashboard
:config
(dashboard-setup-startup-hook)
(setq dashboard-projects-backend 'projectile)
(setq dashboard-banner-logo-title "Emacs et soir, bonsoir")
(setq dashboard-startup-banner 'logo)
(setq dashboard-items '((recents . 5)
(bookmarks . 5)
(projects . 5)
(agenda . 5)
(registers . 5)))
(setq dashboard-item-names '(("Recent Files:" . "Fichiers récents :")
("Agenda for today:" . "Aujourd'hui :")
("Agenda for the coming week:" . "Agenda :")
("Bookmarks:" . "Marque-pages :")))
(setq dashboard-display-icons-p t) ; display icons on both GUI and terminal
(setq dashboard-icon-type 'nerd-icons) ; use `nerd-icons' package
(add-to-list 'dashboard-items '(agenda) t)
(setq dashboard-week-agenda t)
(setq dashboard-filter-agenda-entry 'dashboard-no-filter-agenda)
)
(setq org-latex-compiler "lualatex")
(setq org-preview-latex-default-process 'dvisvgm)
;; Discover
(use-package discover)
(global-discover-mode 1)
;; Guides d'indentation
(use-package highlight-indent-guides
:hook (prog-mode . highlight-indent-guides-mode)
:config
(setq highlight-indent-guides-method 'column)) ;; character ou column
(show-paren-mode 1) ;; surligne les wparenthèses appariées
;; --------
;; Org-mode
;; --------
(use-package org
:bind (("C-c l" . org-store-link)
("C-c a" . org-agenda))
:custom
(org-log-done t) ;; horodatage auto des DONE
(org-src-fontify-natively t) ;; color synt dans les bloc de code
(org-confirm-babel-evaluate nil) ;; pas de confirmation avant eval des blocs de code Babel
;; (org-hide-emphasis-markers t) ;; cacher le markup pour gras & italiques
(org-startup-indented t) ;; indentation intelligente plus lisible
:init
;; (setq org-agenda-files '("~/org", "~/org/junarka/"))
(setq org-agenda-files (directory-files-recursively "~/org" "\\.org$"))
(setq org-agenda-files
(seq-filter
(lambda (file) (not (string-match-p "doc/" file)))
(directory-files-recursively "~/org" "\\.org$")))
(setq org-babel-load-languages
'((emacs-lisp . t)
(python . t)
(shell . t)
(js . t)))
:config
;; autorise l'exécution des blocs de code sans confirmation par langage
(org-babel-do-load-languages
'org-babel-load-languages
org-babel-load-languages))
;; --------
;; Org-roam
;; --------
(use-package org-roam
:after org
:custom
(org-roam-directory (file-truename "~/org-roam"))
(org-roam-completion-everywhere t)
(org-roam-dailies-directory "daily/")
(org-roam-dailies-date-format "%Y_%m_%d")
:bind (("C-c n l" . org-roam-buffer-toggle)
("C-c n f" . org-roam-node-find)
("C-c n i" . org-roam-node-insert)
("C-c n t" . org-roam-dailies-goto-today)
("C-c n y" . org-roam-dailies-goto-yesterday)
("C-c n T" . org-roam-dailies-goto-tomorrow))
;; :map org-mode-map
;; ("C-M-i" . completion-at-point)
;; :map org-roam-dailies-map
;; ("Y" . org-roam-dailies-capture-yesterday)
;; ("T" . org-roam-dailies-capture-tomorrow))
:config
(require 'org-roam-dailies)
(org-roam-db-autosync-mode))
;; Raccourcis supplémentaires pour les dailies
;; (with-eval-after-load 'org-roam-dailies
;; (define-key org-roam-dailies-map (kbd "Y") #'org-roam-dailies-capture-yesterday)
;; (define-key org-roam-dailies-map (kbd "T") #'org-roam-dailies-capture-tomorrow))
;; Raccourci pour la complétion dans org-mode
(with-eval-after-load 'org
(define-key org-mode-map (kbd "C-M-i") #'completion-at-point))
;; (use-package org-roam-dailies
;; :after org-roam
;; :bind-keymap ("C-c n d" . org-roam-dailies-map))
;; -----
;; Magit
;; -----
(use-package magit
:defer t ;; charge Magit seulement quand on l'utilise
:commands (magit-status magit-blame)
:bind (("C-x g" . magit-status)) ;; raccourci classique
:custom
;; éviter les confirmations inutiles
(magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)
;; plus de détails dans les logs
(magit-log-margin '(t "%Y-%m-%d %H:%M " magit-log-margin-width t 18))
;; confirmation automatique pour certaines actions
(magit-save-repository-buffers 'dontask)
:config
;; active forge pour gérer les issues pour Github/Gitlab
(use-package forge
:after magit))
;; -------
;; neotree
;; -------
(add-to-list 'load-path "~/")
(require 'neotree)
(global-set-key [f8] 'neotree-toggle)
(setq neo-theme (if (display-graphic-p) 'ascii))
;; --------
;; nix-mode
;; --------
(use-package nix-mode
:mode "\\.nix\\'")
;; -----
;; THEME
;; -----
(use-package doom-themes
:custom
;; Global settings (defaults)
(doom-themes-enable-bold t) ; if nil, bold is universally disabled
(doom-themes-enable-italic t) ; if nil, italics is universally disabled
;; for treemacs users
(doom-themes-treemacs-theme "doom-atom") ; use "doom-colors" for less minimal icon theme
:config
(load-theme 'doom-vibrant t)
;; Enable flashing mode-line on errors
(doom-themes-visual-bell-config)
;; Enable custom neotree theme (nerd-icons must be installed!)
(doom-themes-neotree-config)
;; or for treemacs users
(doom-themes-treemacs-config)
;; Corrects (and improves) org-mode's native fontification.
(doom-themes-org-config))
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
(add-hook 'text-mode-hook 'visual-line-mode)
;; Mastodon
;; --------
(use-package mastodon
:config
(mastodon-discover)
(setq mastodon-instance-url "https://mapstodon.space"
mastodon-active-user "jeremy"))