9 Commits
Author SHA1 Message Date
msyds 383182c24e Revert "fix: update host aliases"
build / build (push) Successful in 1m19s
This reverts commit cc48c11448.
2026-09-10 15:10:41 -06:00
msyds ff20b976ad Revert "fix(servarr): update ip"
This reverts commit 8e9be9e05d.
2026-09-10 15:10:41 -06:00
msyds 67cb7f35e6 fix(emacs): syntax.. 2026-09-03 07:40:17 -06:00
msyds 6527b0a274 feat(emacs): support mikan in place of agda 2026-09-02 08:14:35 -06:00
msyds f8936662c2 fix(emacs): set haskell-ts vars in haskell-ts
build / build (push) Successful in 59s
2026-09-02 07:57:06 -06:00
msyds cb3119a897 fix(emacs): eshell enter
build / build (push) Successful in 1m48s
2026-09-02 07:55:42 -06:00
msyds f6c4b58d9e fix(emacs): flycheck lsp 2026-09-02 07:55:33 -06:00
msyds cffe715e30 feat(emacs): haskell-ts-mode 2026-09-02 07:55:33 -06:00
msyds 28cc8474cd fix(emacs): start with graphical session 2026-08-29 02:28:46 -06:00
13 changed files with 151 additions and 26 deletions
+9 -1
View File
@@ -141,7 +141,7 @@ in {
sydmacs
];
};
# Set emacsclient as the default editor for the time being.
home.sessionVariables = {
EDITOR = "emacsclient";
@@ -171,6 +171,14 @@ in {
client.enable = true;
};
# Start Emacs after the graphical session so as to inherit
# expected envvars, but don't necessarily /depend/ on a
# graphical session.
systemd.user.services.emacs = {
Unit.After = [ "graphical-session.target" ];
Install.WantedBy = lib.mkForce [ "graphical-session.target" ];
};
# We do this ourselves.
stylix.targets.emacs.enable = false;
});
+14 -2
View File
@@ -12,8 +12,20 @@ in {
builtins.readFile ./haskell/ghc-with-packages.sh;
home.file.".ghc/ghci.conf".text = ''
:set prompt "\x1b[38;5;5mλ>\x1b[0m "
:set prompt-cont "\x1b[38;5;5m|>\x1b[0m "
:{
ghci_set_prompt :: IO String
ghci_set_prompt = do
term <- System.Environment.Blank.getEnvDefault "TERM" ""
let (prompt,promptCont) =
if Data.List.isPrefixOf "xterm-" term
then ("\x1b[38;5;5mλ>\x1b[0m ", "\x1b[38;5;5m|>\x1b[0m ")
else ("λ> ", "|> ")
pure . unlines $
[ ":set prompt " ++ show prompt
, ":set prompt-cont " ++ show promptCont
]
:}
:cmd ghci_set_prompt
:set -interactive-print=Text.Pretty.Simple.pPrint
:m + Text.Show.Functions
:unset +r
+2 -1
View File
@@ -1,5 +1,7 @@
;;; init.el -*- lexical-binding: t -*-
(require 'syd/transient)
(syd-require-features
'(syd/base
syd/constants
@@ -33,7 +35,6 @@
syd/which-key
syd/tramp
syd/handle
syd/flycheck
syd/org
syd/org/roam
syd/org/agenda
@@ -5,11 +5,18 @@
(defun syd-agda-locate-and-load ()
(interactive)
(let ((agda-mode-path (executable-find "agda-mode")))
(load-file
(shell-command-to-string
(format "%s locate" agda-mode-path))))
(setq agda2-program-name (executable-find "agda")))
(if-let* ((agda-mode-path (executable-find "agda-mode"))
(agda-path (executable-find "agda")))
(progn (load-file
(shell-command-to-string
(format "%s locate" agda-mode-path)))
(setq agda2-program-name agda-path))
(when-let* ((mikan-path (executable-find "mikan")))
(setq agda2-program-name mikan-path)
(load-file
(let ((coding-system-for-read 'utf-8))
(shell-command-to-string
(format "%s --emacs-mode locate" mikan-path)))))))
(defface syd-agda2-default
`((t :font ,(font-spec :family "IBM Plex Sans" :size 17)
@@ -93,7 +100,8 @@
(add-to-list
'auto-mode-alist
'("\\.lagda\\.org\\'" . agda2-mode))
`(,(rx ".lagda." (or "org" "md"))
. agda2-mode))
(with-eval-after-load 'smartparens
(sp-local-pair '(agda2-mode) "{!" "!}"))
@@ -18,7 +18,8 @@
:states '(normal insert)
"C-k" #'comint-previous-input
"C-j" #'comint-next-input
"C-s" #'consult-history)
"C-s" #'consult-history
"<return>" #'comint-send-input)
(general-def
:keymaps 'comint-mode-map
:states 'insert
@@ -167,7 +167,8 @@ if FILE-NAME has no TRAMP prefix."
:states '(normal insert)
"C-j" #'eshell-next-matching-input-from-input
"C-k" #'eshell-previous-matching-input-from-input
"C-s" #'consult-history)
"C-s" #'consult-history
"<return>" #'eshell-send-input)
:config
;; When cd'd into a TRAMP remote, automatically expand '/' to the TRAMP
;; notation referring to the remote's root.
@@ -5,10 +5,17 @@
;; Nicer error messages, integrates with `lsp-mode'
(use-package flycheck
:custom ((flycheck-highlighting-mode nil))
:custom (; disable annoying underlines.
(flycheck-highlighting-mode nil)
; don't display error at point without input.
(flycheck-auto-display-errors-after-checking nil))
:general
(:states '(motion normal)
"[ e" #'flycheck-previous-error
"] e" #'flycheck-next-error))
"] e" #'flycheck-next-error)
:config
(syd-defadvice syd-suppress-flycheck-popups-a (&rest _)
:override #'flycheck-display-error-at-point-soon
nil))
(provide 'syd/flycheck)
@@ -9,6 +9,18 @@
(require 'inf-haskell)
(run-haskell))
(defun syd-haskell-ts-open-repl ()
"Open a Haskell REPL."
(interactive)
(haskell-ts-run)
(pop-to-buffer haskell-ts-ghci-buffer-name))
(defun syd-haskell-ts-eval-region (beg end)
(haskell-ts--send-region beg end))
(defun syd-haskell-ts-load-buffer ()
(haskell-ts-load-file))
(defun syd-haskell-evil-open-above ()
"Opens a line above the current, following Haskell-mode's indentation"
(interactive)
@@ -62,13 +74,58 @@
(add-to-list 'haskell-font-lock-quasi-quote-modes '("wats" . wat-mode))
(add-to-list 'haskell-font-lock-quasi-quote-modes '("expr" . wat-mode)))
(use-package consult-hoogle
:config
(syd-push shackle-rules
`("*hoogle-search*"
:select t :size 0.5 :popup t :align bottom)))
(use-package haskell-ts-mode
:straight (:type git
:host github
:repo "dschrempf/haskell-ts-mode")
:custom ((haskell-ts-font-lock-level 4)
(haskell-ts-ghci "ghci")
(haskell-ts-inferior-prompt-regexp
(rx bol (or "λ> " "|> ")))
(haskell-ts-inferior-history-file
(file-name-concat syd-data-dir "haskell-ts-inferior-history")))
:general
(:keymaps 'haskell-ts-mode-map
:states '(normal motion)
:major-modes t
:prefix syd-localleader-key
:non-normal-prefix syd-alt-localleader-key
"h s" #'syd-haskell-hoogle-start-server
"h q" #'haskell-hoogle-kill-server
"c" #'haskell-cabal-visit-file)
:config
(add-to-list 'completion-ignored-extensions ".hi")
(syd-add-hook 'haskell-ts-mode-hook
(defun syd-haskell-configure-indent-h ()
(setq-local tab-width 2)
;; (setq-local indent-line-function #'tab-to-tab-stop)
(indent-tabs-mode -1))
(defun syd-haskell-configure-evil-h ()
(setq-local evil-symbol-word-search nil)))
(syd-handle '(haskell-ts-mode)
:repl #'syd-haskell-ts-open-repl
:eval-region #'syd-haskell-ts-eval-region
:load-buffer #'syd-haskell-ts-load-buffer)
(syd-defadvice syd-haskell-hide-repl-h (old &rest rs)
:around #'haskell-ts-show-repl
(save-window-excursion
(apply old rs))))
(use-package lsp-haskell
:defer t
:custom ((lsp-haskell-server-path "haskell-language-server"))
:init
(add-hook 'haskell-mode-hook #'lsp-deferred 'append)
(add-hook 'haskell-literate-mode-hook #'lsp-deferred 'append)
(syd-add-hook '(haskell-mode-hook haskell-literate-mode-hook)
(add-hook 'haskell-ts-mode-hook #'lsp-deferred 'append)
(syd-add-hook '(haskell-ts-mode-hook
haskell-mode-hook haskell-literate-mode-hook)
(defun syd-haskell-configure-lsp-h ()
;; it often highlights list literals and quasiquotes which
;; gets reaaaally annoying.
@@ -3,6 +3,7 @@
(require 'syd/base)
(require 'syd/popups)
(require 'syd/handle)
(require 'syd/flycheck)
(use-package lsp-mode
:init
@@ -1,7 +1,11 @@
;;; -*- lexical-binding: t -*-
(require 'syd/base)
;; Disable tabs by default.
;; Tabs, not spaces.
(setq-default indent-tabs-mode nil)
(setq-default tab-width 2)
(use-package kakapo-mode
:hook ((prog-mode . kakapo-mode)))
(provide 'syd/tabs)
+30 -5
View File
@@ -6,9 +6,34 @@ in {
enable = lib.mkEnableOption "Treesitter grammars";
};
config = lib.mkIf cfg.enable {
sydnix.emacs.emacsPackages = epkgs: [
epkgs.treesit-grammars.with-all-grammars
];
};
config = lib.mkIf cfg.enable
# https://github.com/dschrempf/haskell-ts-mode/blob/1c236f00dc214e546124a5dac90902ba62500c15/flake.nix#L40-L55
(let
grammars = pkgs.tree-sitter-grammars.overrideScope (ts-final: ts-prev: {
tree-sitter-haskell = ts-prev.tree-sitter-haskell.overrideAttrs (prev:
let rev = "1ad6077a1fb776c255836e00aeb6da57ba564b6a";
in {
version = "unstable-2026-07-07-${builtins.substring 0 7 rev}";
src = pkgs.fetchFromGitHub {
owner = "dschrempf";
repo = "tree-sitter-haskell";
inherit rev;
hash = "sha256-kC6HwImFRx5HUY7NDLAA0I/DaSstQ94dWxA9+lMx2gI=";
};
nativeBuildInputs = (prev.nativeBuildInputs or [ ]) ++ [
pkgs.nodejs
pkgs.tree-sitter
];
preBuild = ''
tree-sitter generate
'';
});
});
in {
sydnix.emacs.emacsPackages = epkgs: [
(epkgs.treesit-grammars.with-grammars (_ps:
grammars.allGrammars
))
];
});
}
+1 -1
View File
@@ -36,7 +36,7 @@ in {
# Mount our NAS's 'media' share.
fileSystems."/media" = {
# DNS is seemingly unavailable to the mount service.
device = "//10.0.0.203/media";
device = "//192.168.68.62/media";
mountPoint = "/media";
fsType = "cifs";
options = [
+4 -4
View File
@@ -4,10 +4,10 @@
config = {
networking.hosts = {
"100.95.131.43" = [ "whitepc" ];
"10.0.0.109" = [ "guix-rebound" "sydpc" ];
"10.0.0.248" = [ "deertopia" ];
"10.0.0.218" = [ "fruitbook" ];
"10.0.0.203" = [ "buffalo-nas" ];
"192.168.68.66" = [ "guix-rebound" "sydpc" ];
"192.168.68.79" = [ "deertopia" ];
"192.168.68.55" = [ "fruitbook" ];
"192.168.68.62" = [ "buffalo-nas" ];
};
};
}