diff options
Diffstat (limited to 'accounts')
-rw-r--r-- | accounts/gkleen@sif/default.nix | 35 | ||||
-rw-r--r-- | accounts/gkleen@sif/emacs.el | 5 |
2 files changed, 19 insertions, 21 deletions
diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index a4d9dab6..11bd221c 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix | |||
@@ -1,15 +1,7 @@ | |||
1 | { flake, userName, pkgs, customUtils, lib, config, ... }@inputs: | 1 | { flake, flakeInputs, userName, pkgs, customUtils, lib, config, ... }@inputs: |
2 | let | 2 | let |
3 | cfg = config.home-manager.users.${userName}; | 3 | cfg = config.home-manager.users.${userName}; |
4 | xmonad = import ./xmonad pkgs.haskellPackages; | 4 | xmonad = import ./xmonad pkgs.haskellPackages; |
5 | emacsclientDesktopItem = pkgs.makeDesktopItem { | ||
6 | name = "emacsclient"; | ||
7 | genericName = "Text Editor"; | ||
8 | desktopName = "emacsclient"; | ||
9 | icon = "emacs"; | ||
10 | mimeTypes = ["text/english" "text/plain" "text/x-makefile" "text/x-c++hdr" "text/x-c++src" "text/x-chdr" "text/x-csrc" "text/x-java" "text/x-moc" "text/x-pascal" "text/x-tcl" "text/x-tex" "application/x-shellscript" "text/x-c" "text/x-c++"]; | ||
11 | exec = "${config.home-manager.users.${userName}.programs.emacs.package}/bin/emacsclient -a \"\" %F"; | ||
12 | }; | ||
13 | emacsScratch = pkgs.stdenv.mkDerivation rec { | 5 | emacsScratch = pkgs.stdenv.mkDerivation rec { |
14 | pname = "scratch"; | 6 | pname = "scratch"; |
15 | version = "0077334cc299aa7885f804d88f52cdb1b35caf71"; | 7 | version = "0077334cc299aa7885f804d88f52cdb1b35caf71"; |
@@ -142,13 +134,17 @@ in { | |||
142 | }; | 134 | }; |
143 | 135 | ||
144 | zsh.initExtra = "source ${./zshrc}"; | 136 | zsh.initExtra = "source ${./zshrc}"; |
145 | zsh.dirHashes = { | 137 | zsh.dirHashes = let |
138 | flakeHashes = lib.mapAttrs' (n: v: lib.nameValuePair (inputNames.${n} or n) (toString v)) flakeInputs; | ||
139 | inputNames = { | ||
140 | "nixpkgs" = "nixos"; | ||
141 | }; | ||
142 | in flakeHashes // { | ||
146 | u2w = "$HOME/projects/uni2work"; | 143 | u2w = "$HOME/projects/uni2work"; |
147 | docs = "$HOME/documents"; | 144 | docs = "$HOME/documents"; |
148 | dl = "$HOME/Downloads"; | 145 | dl = "$HOME/Downloads"; |
149 | flk = "$HOME/config/nixos-flakes"; | 146 | flk = "$HOME/config/nixos-flakes"; |
150 | fsk-timi = "$HOME/projects/21s/fsk-timi"; | 147 | rz = "$HOME/projects/rz"; |
151 | fsk-timi-exam = "$HOME/projects/21s/fsk-timi-exam"; | ||
152 | }; | 148 | }; |
153 | 149 | ||
154 | obs-studio = { | 150 | obs-studio = { |
@@ -173,7 +169,13 @@ in { | |||
173 | iconTheme = cfg.gtk.iconTheme; | 169 | iconTheme = cfg.gtk.iconTheme; |
174 | enable = true; | 170 | enable = true; |
175 | }; | 171 | }; |
176 | emacs.enable = true; | 172 | emacs = { |
173 | enable = true; | ||
174 | client = { | ||
175 | enable = true; | ||
176 | arguments = lib.mkForce ["-a" "\"\""]; | ||
177 | }; | ||
178 | }; | ||
177 | gpg-agent = { | 179 | gpg-agent = { |
178 | enable = true; | 180 | enable = true; |
179 | enableSshSupport = true; | 181 | enableSshSupport = true; |
@@ -286,7 +288,7 @@ in { | |||
286 | google-play-music-desktop-player qt5ct playerctl evince | 288 | google-play-music-desktop-player qt5ct playerctl evince |
287 | thunderbird wrappedZulip zoom-us steam steam-run wireshark | 289 | thunderbird wrappedZulip zoom-us steam steam-run wireshark |
288 | virt-manager rclone cached-nix-shell xournal xmonad worktime | 290 | virt-manager rclone cached-nix-shell xournal xmonad worktime |
289 | fira-code-symbols emacsclientDesktopItem libreoffice xournalpp | 291 | fira-code-symbols libreoffice xournalpp |
290 | wrappedChrome nixos-shell virt-viewer freerdp gnome-icon-theme | 292 | wrappedChrome nixos-shell virt-viewer freerdp gnome-icon-theme |
291 | paper-icon-theme sshpassSecret weechat helvum | 293 | paper-icon-theme sshpassSecret weechat helvum |
292 | wrappedElementDesktop matrix-synapse-tools.synadm | 294 | wrappedElementDesktop matrix-synapse-tools.synadm |
@@ -294,10 +296,7 @@ in { | |||
294 | ]; | 296 | ]; |
295 | 297 | ||
296 | file = { | 298 | file = { |
297 | ".emacs" = { | 299 | ".emacs".source = ./emacs.el; |
298 | source = ./emacs.el; | ||
299 | onChange = "${pkgs.systemd}/bin/systemctl --user try-restart emacs.service"; | ||
300 | }; | ||
301 | ".backup-munin".source = ./backup-patterns; | 300 | ".backup-munin".source = ./backup-patterns; |
302 | ".mozilla/firefox/default/chrome/userChrome.css".source = ./firefox-chrome.css; | 301 | ".mozilla/firefox/default/chrome/userChrome.css".source = ./firefox-chrome.css; |
303 | ".mozilla/firefox/default/chrome/userContent.css".source = ./firefox-content.css; | 302 | ".mozilla/firefox/default/chrome/userContent.css".source = ./firefox-content.css; |
diff --git a/accounts/gkleen@sif/emacs.el b/accounts/gkleen@sif/emacs.el index ad04c9ea..fbbd1ec9 100644 --- a/accounts/gkleen@sif/emacs.el +++ b/accounts/gkleen@sif/emacs.el | |||
@@ -84,9 +84,8 @@ | |||
84 | (dir (cadr tilde:dir))) | 84 | (dir (cadr tilde:dir))) |
85 | (push (cons tilde dir) expand-file-name-custom-tilde-alist))) | 85 | (push (cons tilde dir) expand-file-name-custom-tilde-alist))) |
86 | (mapc #'my/add-to-tilde-alist | 86 | (mapc #'my/add-to-tilde-alist |
87 | (split-string (with-output-to-string | 87 | (split-string (let ((process-environment (cl-copy-list process-environment))) (setenv "TERM" nil) (with-output-to-string (call-process "script" nil standard-output nil "-qec" "zsh -ic \"hash -d\"" "/dev/null"))) |
88 | (call-process "zsh" nil standard-output nil "-ic" "hash -d")) | 88 | "\r\n" t)) |
89 | "\n" t)) | ||
90 | 89 | ||
91 | (defadvice expand-file-name (before expand-file-name-custom-tilde | 90 | (defadvice expand-file-name (before expand-file-name-custom-tilde |
92 | (name &optional default-directory) | 91 | (name &optional default-directory) |