This commit is contained in:
2025-08-03 20:02:48 +02:00
parent 55a090959d
commit c22eab800c
15 changed files with 4 additions and 515 deletions

View File

@@ -1,34 +1,2 @@
{ user, config, pkgs, ... }:
let
xdg_configHome = "${config.users.users.${user}.home}/.config";
xdg_dataHome = "${config.users.users.${user}.home}/.local/share";
xdg_stateHome = "${config.users.users.${user}.home}/.local/state"; in
{
# Raycast script so that "Run Emacs" is available and uses Emacs daemon
"${xdg_dataHome}/bin/emacsclient" = {
executable = true;
text = ''
#!/bin/zsh
#
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Run Emacs
# @raycast.mode silent
#
# Optional parameters:
# @raycast.packageName Emacs
# @raycast.icon ${xdg_dataHome}/img/icons/Emacs.icns
# @raycast.iconDark ${xdg_dataHome}/img/icons/Emacs.icns
if [[ $1 = "-t" ]]; then
# Terminal mode
${pkgs.emacs}/bin/emacsclient -t $@
else
# GUI mode
${pkgs.emacs}/bin/emacsclient -c -n $@
fi
'';
};
}
{}

View File

@@ -2,11 +2,6 @@
let
user = "cschmatzler";
# Define the content of your file as a derivation
myEmacsLauncher = pkgs.writeScript "emacs-launcher.command" ''
#!/bin/sh
emacsclient -c -n &
'';
sharedFiles = import ../shared/files.nix { inherit config pkgs; };
additionalFiles = import ./files.nix { inherit user config pkgs; };
in
@@ -54,7 +49,6 @@ in
file = lib.mkMerge [
sharedFiles
additionalFiles
{ "emacs-launcher.command".source = myEmacsLauncher; }
];
stateVersion = "23.11";
@@ -81,10 +75,6 @@ in
{ path = "/System/Applications/Photos.app/"; }
{ path = "/System/Applications/Photo Booth.app/"; }
{ path = "/System/Applications/System Settings.app/"; }
{
path = toString myEmacsLauncher;
section = "others";
}
{
path = "${config.users.users.${user}.home}/Downloads";
section = "others";

View File

@@ -31,7 +31,6 @@ shared-packages ++ [
rofi
rofi-calc
postgresql
libtool # for Emacs vterm
# Screenshot and recording tools
flameshot
@@ -42,7 +41,6 @@ shared-packages ++ [
tree
unixtools.ifconfig
unixtools.netstat
xclip # For the org-download package in Emacs
xorg.xwininfo # Provides a cursor to click and learn about windows
xorg.xrandr

View File

@@ -1,8 +1,5 @@
{ config, pkgs, ... }:
let
emacsOverlaySha256 = "0rvpskk1z996arcj48ch4g08lvid6r856m0x5376y7lfjxlsawga";
in
{
nixpkgs = {
@@ -19,11 +16,6 @@ in
map (n: import (path + ("/" + n)))
(filter (n: match ".*\\.nix" n != null ||
pathExists (path + ("/" + n + "/default.nix")))
(attrNames (readDir path)))
++ [(import (builtins.fetchTarball {
url = "https://github.com/nix-community/emacs-overlay/archive/refs/heads/master.tar.gz";
sha256 = emacsOverlaySha256;
}))];
(attrNames (readDir path)));
};
}

View File

@@ -6,7 +6,6 @@ with pkgs; [
bat
docker
docker-compose
ghostty
gnupg
iosevka
jq