fix spacemacs

Signed-off-by: Xe <me@christine.website>
This commit is contained in:
Cadey Ratio 2023-01-24 22:00:24 -05:00
parent 075f5d6426
commit 5fcd164ef3
3 changed files with 53 additions and 37 deletions

View File

@ -1,6 +1,9 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
let e = pkgs.writeTextFile { with lib;
let
e = pkgs.writeTextFile {
name = "cadey-emacs.desktop"; name = "cadey-emacs.desktop";
destination = "/share/applications/cadey-emacs.desktop"; destination = "/share/applications/cadey-emacs.desktop";
text = '' text = ''
@ -14,8 +17,12 @@ Terminal=false
Type=Application Type=Application
''; '';
}; };
in
{ cfg = config.within.spacemacs;
in {
options.within.spacemacs.enable = mkEnableOption "emacs with spacemacs";
config = mkIf cfg.enable {
home.packages = with pkgs; [ anonymousPro e sqlite-interactive graphviz ]; home.packages = with pkgs; [ anonymousPro e sqlite-interactive graphviz ];
programs.emacs.enable = true; programs.emacs.enable = true;
@ -43,4 +50,5 @@ in
systemctl --user restart emacs systemctl --user restart emacs
fi fi
''; '';
};
} }

View File

@ -48,4 +48,8 @@
}; };
systemd.services.tailscaled.path = with pkgs; [ mosh getent shadow ]; systemd.services.tailscaled.path = with pkgs; [ mosh getent shadow ];
home-manager.users.cadey = { ... }: {
within.spacemacs.enable = true;
};
} }

View File

@ -68,4 +68,8 @@
}; };
within.users.enableSystem = true; within.users.enableSystem = true;
home-manager.users.cadey = { ... }: {
within.emacs.enable = true;
};
} }