fix: inaccuracies in emacs config

This commit is contained in:
Leon Schwarzäugl 2025-07-22 01:25:27 +02:00
parent d7f27943a5
commit ba1bba39b4
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
9 changed files with 219 additions and 116 deletions

View file

@ -1,12 +1,26 @@
{ self, lib, config, pkgs, ... }:
{ self, lib, config, pkgs, globals, ... }:
let
inherit (config.swarselsystems) homeDir isPublic isNixos;
inherit (config.repo.secrets.common.emacs) radicaleUser;
in
{
options.swarselmodules.emacs = lib.mkEnableOption "emacs settings";
config = lib.mkIf config.swarselmodules.emacs {
# needed for elfeed
sops.secrets.fever-pw = lib.mkIf (!isPublic && !isNixos) { path = "${homeDir}/.emacs.d/.fever"; };
sops = lib.mkIf (!isPublic && !isNixos) {
secrets = {
fever-pw = { path = "${homeDir}/.emacs.d/.fever"; };
emacs-radicale-pw = { };
};
templates = {
authinfo = {
path = "${homeDir}/.emacs.d/.authinfo";
content = ''
machine ${globals.services.radicale.domain} login ${radicaleUser} password ${config.sops.placeholder.emacs-radicale-pw}
'';
};
};
};
# enable emacs overlay for bleeding edge features
# also read init.el file and install use-package packages