diff options
Diffstat (limited to 'accounts')
| -rw-r--r-- | accounts/gkleen@sif/default.nix | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index e900370b..44609927 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix | |||
| @@ -50,6 +50,17 @@ let | |||
| 50 | }; | 50 | }; |
| 51 | 51 | ||
| 52 | lockCommand = "${lib.getExe' config.systemd.package "systemctl"} --user start gtklock.service"; | 52 | lockCommand = "${lib.getExe' config.systemd.package "systemctl"} --user start gtklock.service"; |
| 53 | |||
| 54 | editor = pkgs.symlinkJoin { | ||
| 55 | inherit (cfg.services.emacs.package) name; | ||
| 56 | buildInputs = with pkgs; [ makeWrapper ]; | ||
| 57 | paths = [ cfg.services.emacs.package ]; | ||
| 58 | postBuild = '' | ||
| 59 | wrapProgram $out/bin/emacsclient \ | ||
| 60 | --inherit-argv0 \ | ||
| 61 | --add-flags ${lib.escapeShellArgs cfg.services.emacs.client.arguments} | ||
| 62 | ''; | ||
| 63 | }; | ||
| 53 | in { | 64 | in { |
| 54 | imports = with flake.nixosModules.userProfiles.${userName}; [ | 65 | imports = with flake.nixosModules.userProfiles.${userName}; [ |
| 55 | mpv yt-dlp (args: import ./xcompose.nix (inputs // args)) | 66 | mpv yt-dlp (args: import ./xcompose.nix (inputs // args)) |
| @@ -281,7 +292,7 @@ in { | |||
| 281 | gh = { | 292 | gh = { |
| 282 | enable = true; | 293 | enable = true; |
| 283 | settings = { | 294 | settings = { |
| 284 | editor = lib.getExe' config.home-manager.users.${userName}.programs.emacs.package "emacsclient"; | 295 | editor = lib.getExe' editor "emacsclient"; |
| 285 | gitProtocol = "ssh"; | 296 | gitProtocol = "ssh"; |
| 286 | }; | 297 | }; |
| 287 | }; | 298 | }; |
| @@ -354,7 +365,7 @@ in { | |||
| 354 | socketActivation.enable = true; | 365 | socketActivation.enable = true; |
| 355 | client = { | 366 | client = { |
| 356 | enable = true; | 367 | enable = true; |
| 357 | arguments = mkForce ["--reuse-frame" "--alternate-editor" "\"\""]; | 368 | arguments = mkForce ["--create-frame" "--alternate-editor" (lib.getExe cfg.services.emacs.package)]; |
| 358 | }; | 369 | }; |
| 359 | }; | 370 | }; |
| 360 | gpg-agent = { | 371 | gpg-agent = { |
| @@ -503,11 +514,7 @@ in { | |||
| 503 | QT_QPA_PLATFORMTHEME = "qt5ct"; | 514 | QT_QPA_PLATFORMTHEME = "qt5ct"; |
| 504 | LIBVIRT_DEFAULT_URI = "qemu:///system"; | 515 | LIBVIRT_DEFAULT_URI = "qemu:///system"; |
| 505 | STACK_XDG = 1; | 516 | STACK_XDG = 1; |
| 506 | EDITOR = pkgs.writeShellScript "editor" '' | 517 | EDITOR = lib.getExe' editor "emacsclient"; |
| 507 | args=("--reuse-frame" "--alternate-editor" "") | ||
| 508 | args+=("$@") | ||
| 509 | exec -a emacsclient ${lib.getExe' cfg.services.emacs.package "emacsclient"} "''${args[@]}" | ||
| 510 | ''; | ||
| 511 | RCLONE_PASSWORD_COMMAND = "${lib.getExe' pkgs.libsecret "secret-tool"} lookup service rclone"; | 518 | RCLONE_PASSWORD_COMMAND = "${lib.getExe' pkgs.libsecret "secret-tool"} lookup service rclone"; |
| 512 | }; | 519 | }; |
| 513 | 520 | ||
