Various
- firewall rule for VNC for `pc` host - `go-translate` emacs package with custom bindings - `magit-delta` to improve diffs readability with `magit` through `delta` - `fira-code-mode` enabled only in `prog-mode` - `mpv` is spawned by `qutebrowser` without waiting for video being loaded
This commit is contained in:
parent
99cd09401a
commit
6791cb51a2
12 changed files with 64 additions and 10 deletions
1
emacs.d
Symbolic link
1
emacs.d
Symbolic link
|
@ -0,0 +1 @@
|
|||
users/profiles/emacs/emacs.d
|
6
flake.lock
generated
6
flake.lock
generated
|
@ -274,11 +274,11 @@
|
|||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1649849514,
|
||||
"narHash": "sha256-zQyTr2UebTKUh1KLyLtevhHsM8umPK1LfQLGUGjRjiQ=",
|
||||
"lastModified": 1650522846,
|
||||
"narHash": "sha256-SxWHXRI3qJwswyXAtzsi6PKVY3KLNNnb072KaJthII8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "1a0ccdbf4583ed0fce37eea7955e8ef90f840a9f",
|
||||
"rev": "6b4ebea9093c997c5f275c820e679108de4871ab",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -51,6 +51,15 @@
|
|||
};
|
||||
};
|
||||
|
||||
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowPing = true;
|
||||
allowedTCPPorts = [
|
||||
5900 # vnc
|
||||
];
|
||||
};
|
||||
|
||||
# TODO: disable, only for playing
|
||||
services.hydra = {
|
||||
enable = true;
|
||||
|
|
|
@ -18,6 +18,7 @@ emacsWithPackages (
|
|||
evil-collection
|
||||
fira-code-mode
|
||||
good-scroll
|
||||
go-translate
|
||||
haskell-mode
|
||||
helm
|
||||
helm-ag
|
||||
|
@ -28,6 +29,7 @@ emacsWithPackages (
|
|||
lsp-mode
|
||||
lsp-python-ms
|
||||
magit
|
||||
magit-delta
|
||||
nix-mode
|
||||
notmuch
|
||||
org-download
|
||||
|
|
|
@ -2,5 +2,8 @@
|
|||
services.openssh = {
|
||||
enable = true;
|
||||
permitRootLogin = "yes";
|
||||
forwardX11 = true;
|
||||
};
|
||||
|
||||
programs.ssh.setXAuthLocation = true;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
wineWowPackages.full
|
||||
vial
|
||||
deploy-rs.deploy-rs # to slow to cross compile for aarch64
|
||||
digikam # broken
|
||||
digikam
|
||||
] else [ ])
|
||||
else [ ]);
|
||||
};
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
};
|
||||
in
|
||||
with pkgs; [
|
||||
silver-searcher
|
||||
delta
|
||||
fd
|
||||
graphviz-nox
|
||||
hunspell
|
||||
|
@ -47,6 +47,7 @@
|
|||
poppler_utils
|
||||
python3Full
|
||||
rnix-lsp
|
||||
silver-searcher
|
||||
stylish-haskell
|
||||
unzip
|
||||
(
|
||||
|
|
|
@ -10,11 +10,10 @@
|
|||
)
|
||||
|
||||
(use-package fira-code-mode
|
||||
:after all-the-icons
|
||||
;;:custom (fira-code-mode-disabled-ligatures '("x")) ;; List of ligatures to turn off
|
||||
:config (progn
|
||||
(global-fira-code-mode)
|
||||
;;TODO: why a timer is needed? It shouldn't
|
||||
(run-at-time "30 sec" nil #'set-fontset-font t '(#Xe100 . #Xe16f) "Fira Code Symbol")))
|
||||
:config
|
||||
:hook ((prog-mode . (lambda () (progn (fira-code-mode) (set-fontset-font t '(#Xe100 . #Xe16f) "Fira Code Symbol"))))))
|
||||
|
||||
(use-package visual-fill-column
|
||||
:commands (visual-fill-column-mode)
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
:bind (("C-x g" . magit-status)
|
||||
("C-x C-g" . magit-status)))
|
||||
|
||||
(use-package magit-delta
|
||||
:hook (magit-mode . magit-delta-mode))
|
||||
|
||||
(use-package transient
|
||||
:defer t
|
||||
:config
|
||||
|
|
34
users/profiles/emacs/emacs.d/config/config-translate.el
Normal file
34
users/profiles/emacs/emacs.d/config/config-translate.el
Normal file
|
@ -0,0 +1,34 @@
|
|||
(use-package go-translate
|
||||
:config
|
||||
(defclass gts-insert-render (gts-render) ())
|
||||
|
||||
(cl-defmethod gts-out ((_ gts-insert-render) task)
|
||||
(deactivate-mark)
|
||||
(insert (oref task result)))
|
||||
|
||||
(setq gts-translate-list '(("it" "en")))
|
||||
(setq gts-default-translator
|
||||
(gts-translator
|
||||
:picker
|
||||
(gts-prompt-picker)
|
||||
:engines
|
||||
(gts-google-engine :parser (gts-google-summary-parser))
|
||||
:render
|
||||
(gts-insert-render)
|
||||
))
|
||||
(defun gts-pop-definition ()
|
||||
(interactive)
|
||||
(gts-translate (gts-translator
|
||||
:picker
|
||||
(gts-noprompt-picker :texter (gts-current-or-selection-texter) :single t)
|
||||
:engines
|
||||
(gts-google-engine)
|
||||
:render
|
||||
(gts-posframe-pop-render)
|
||||
)))
|
||||
|
||||
:bind
|
||||
(("C-c t t" . gts-do-translate)
|
||||
("C-c t p" . gts-pop-definition)))
|
||||
|
||||
(provide 'config-translate)
|
|
@ -27,5 +27,6 @@ Return nil if COMMAND is not found anywhere in `exec-path'."
|
|||
(require 'config-nix)
|
||||
(require 'config-purescript)
|
||||
(require 'config-scad)
|
||||
(require 'config-translate)
|
||||
|
||||
(server-start)
|
||||
|
|
|
@ -8,10 +8,11 @@
|
|||
no = "https://search.nixos.org/options?sort=relevance&type=options&query={}";
|
||||
g = "https://google.com/search?q={}";
|
||||
git = "https://github.com/search?q={}";
|
||||
y = "https://www.youtube.com/results?search_query={}";
|
||||
};
|
||||
keyBindings = {
|
||||
normal = {
|
||||
"<Ctrl-V>" = "spawn mpv {url}";
|
||||
"<Ctrl-V>" = "spawn mpv --force-window=immediate {url}";
|
||||
",l" = ''config-cycle spellcheck.languages [" it-IT "] [" en-US "]'';
|
||||
"<z><l>" = "spawn --userscript qute-pass --dmenu-invocation 'fuzzel -d'";
|
||||
"<z><u><l>" = "spawn --userscript qute-pass --dmenu-invocation 'fuzzel -d' --username-only";
|
||||
|
|
Loading…
Add table
Reference in a new issue