add emacs

This commit is contained in:
Clayton Hickey 2025-12-04 17:38:28 -05:00
parent 9a1e9e0c31
commit d747904572
3 changed files with 26 additions and 0 deletions

View file

@ -13,6 +13,9 @@
cos.docker.enable = true;
cos.remoteBuild.enable = false;
cos.emacs.enable = true;
cos.emacs.org-directory = "~/Nextcloud/Emacs/org/";
cos.gnupg.enable = true;

View file

@ -8,6 +8,7 @@
./remoteBuild.nix
./gnupg.nix
./bikeability.nix
./emacs.nix
"${inputs.home-manager}/nixos"
];

22
emacs.nix Normal file
View file

@ -0,0 +1,22 @@
{ lib, config, ... }:
let cfg = config.cos.emacs; in
{
options.cos.emacs = {
enable = lib.mkEnableOption "emacs";
org-directory = lib.mkOption {
type = lib.types.str;
default = "~/org";
};
};
config = lib.mkIf cfg.enable {
home-manager.users.${config.cos.username} = {pkgs, ...}: {
programs.emacs = {
enable = true;
extraConfig = ''
(setq package-archives nil)
'';
};
};
};
}