diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/common/common/stylix.nix | 3 | ||||
-rw-r--r-- | modules/common/emacs/doom/config.el | 47 | ||||
-rw-r--r-- | modules/common/emacs/doom/init.el | 10 | ||||
-rw-r--r-- | modules/common/emacs/doom/packages.el | 13 | ||||
-rw-r--r-- | modules/common/git.nix | 1 | ||||
-rw-r--r-- | modules/nixos/loki.nix | 16 | ||||
-rw-r--r-- | modules/nixos/monitoring/default.nix | 36 | ||||
-rw-r--r-- | modules/nixos/thunderbird.nix | 6 |
8 files changed, 61 insertions, 71 deletions
diff --git a/modules/common/common/stylix.nix b/modules/common/common/stylix.nix index 27a9e35..6e61b54 100644 --- a/modules/common/common/stylix.nix +++ b/modules/common/common/stylix.nix @@ -26,6 +26,9 @@ with lib; { readOnly = true; }; + # Styling and color binding can be sourced from here[1]. + # + # [1]: https://github.com/tinted-theming/base24/blob/master/styling.md config = { stylix = { image = pkgs.fetchurl { diff --git a/modules/common/emacs/doom/config.el b/modules/common/emacs/doom/config.el index 15bcdff..79b33fc 100644 --- a/modules/common/emacs/doom/config.el +++ b/modules/common/emacs/doom/config.el @@ -24,31 +24,41 @@ doom-modeline-height 30) ;; +;;; Editorconfig +;; + +(setq +editorconfig-mode-alist '((sh-mode . "sh")) + editorconfig-exclude-modes '(lisp-mode + common-lisp-mode + emacs-lisp-mode + org-mode)) + +;; ;;; LSP ;; (setq lsp-enable-suggest-server-download nil - lsp-enable-file-watchers t - lsp-file-watch-threshold 4096 lsp-modeline-code-actions-enable nil) ;; ;;; Go ;; -(setq lsp-go-analyses '((shadow . t) - (unsedvariable . t) - (unusedparams . t) - (unusedwrite . t) - (useany . t))) +(setq lsp-go-analyses + '((unsedvariable . t) + (unusedparams . t) + (unusedwrite . t))) ;; ;;; Org ;; +(setq org-directory "~/doc/org") + +;; For some reason only using `after!' work here. `setq-hook!' and etc doesn't +;; produce expected results. (after! org - (setq org-directory "~/doc/org/" - org-todo-keywords '((sequence + (setq org-todo-keywords '((sequence "TODO(t)" "LOOP(r)" "STRT(s@)" @@ -140,17 +150,14 @@ ;;; YAML ;; -;; There's no optimal solution to properly deal with Go templates inside YAML. I -;; have to turn this off to save myself the headache of dealing with syntax -;; errors up my ass. +;; Turn off `flycheck-mode' and `lsp-mode' for Helm templates. (add-hook! 'yaml-mode-hook (defun nixfiles/disable-flycheck-for-helm-templates-h () (when (and buffer-file-name (string-match-p "/templates/" buffer-file-name) (or (string-suffix-p ".yaml" buffer-file-name) (string-suffix-p ".yml" buffer-file-name))) - (remove-hook! 'yaml-mode-local-vars-hook #'lsp!) - (pushnew! flycheck-disabled-checkers 'yaml-jsyaml 'yaml-ruby 'yaml-yamllint)))) + (remove-hook! 'yaml-mode-local-vars-hook #'lsp!)))) (setq-hook! 'yaml-mode-hook +format-with-lsp nil) @@ -195,18 +202,6 @@ '("libera" "oftc" "hackint" "rizon"))) ;; -;;; Fcitx -;; - -(use-package! fcitx - :after evil - :config - (when (setq fcitx-remote-command - (or (executable-find "fcitx5-remote") - (executable-find "fcitx-remote"))) - (fcitx-evil-turn-on))) - -;; ;;; Hledger ;; diff --git a/modules/common/emacs/doom/init.el b/modules/common/emacs/doom/init.el index 705f0ef..571993b 100644 --- a/modules/common/emacs/doom/init.el +++ b/modules/common/emacs/doom/init.el @@ -53,7 +53,7 @@ (eval +overlay) (lookup +dictionary +offline) (lsp +peek) - (magit +forge) + magit make (pass +auth) pdf @@ -62,7 +62,7 @@ upload :os - (:if IS-MAC macos) + (:if (featurep :system 'macos) macos) :lang (cc +lsp +tree-sitter) @@ -71,8 +71,8 @@ emacs-lisp (go +lsp +tree-sitter) (haskell +lsp +tree-sitter) - (java +lsp +tree-sitter) - (javascript +lsp +tree-sitter) + java + javascript (json +lsp +tree-sitter) kotlin (latex +latexmk +cdlatex +lsp) @@ -83,7 +83,7 @@ (python +poetry +lsp +tree-sitter) (rust +lsp +tree-sitter) (sh +lsp +tree-sitter) - (web +lsp +tree-sitter) + web (yaml +lsp +tree-sitter) (zig +lsp +tree-sitter) diff --git a/modules/common/emacs/doom/packages.el b/modules/common/emacs/doom/packages.el index cbd90ea..80490de 100644 --- a/modules/common/emacs/doom/packages.el +++ b/modules/common/emacs/doom/packages.el @@ -1,16 +1,7 @@ (disable-packages! writegood-mode) -(package! org-roam - :recipe (:host github - :repo "org-roam/org-roam" - :branch "main")) -(package! org-roam-ui - :recipe (:host github - :repo "org-roam/org-roam-ui" - :branch "main")) - -(package! hledger-mode) +(package! org-roam-ui) (package! nickel-mode) -(package! fcitx) +(package! hledger-mode) diff --git a/modules/common/git.nix b/modules/common/git.nix index f582f66..c6be614 100644 --- a/modules/common/git.nix +++ b/modules/common/git.nix @@ -103,6 +103,7 @@ in { // mapAttrs' (name: values: nameValuePair ''url "https://${values}/"'' {insteadOf = "${name}:";}) { "alpine" = "gitlab.alpinelinux.org"; + "debian" = "salsa.debian.org"; "freedesktop" = "gitlab.freedesktop.org"; "gnome" = "gitlab.gnome.org"; "haskell" = "gitlab.haskell.org"; diff --git a/modules/nixos/loki.nix b/modules/nixos/loki.nix index 4b17256..ce19004 100644 --- a/modules/nixos/loki.nix +++ b/modules/nixos/loki.nix @@ -94,21 +94,7 @@ in { schema_config.configs = [ { - from = "2020-01-01"; - store = "boltdb-shipper"; - object_store = "filesystem"; - schema = "v11"; - index = { - prefix = "index_"; - period = "24h"; - }; - chunks = { - prefix = "chunks_"; - period = "24h"; - }; - } - { - from = "2023-12-01"; + from = "2024-01-01"; store = "tsdb"; object_store = "filesystem"; schema = "v12"; diff --git a/modules/nixos/monitoring/default.nix b/modules/nixos/monitoring/default.nix index fbc0e60..5aed215 100644 --- a/modules/nixos/monitoring/default.nix +++ b/modules/nixos/monitoring/default.nix @@ -32,27 +32,27 @@ in { # https://grafana.com/docs/grafana/latest/administration/provisioning/#data-sources datasources.settings.datasources = with config.nixfiles.modules; [ - { + (mkIf alertmanager.enable { name = "Alertmanager"; type = "alertmanager"; access = "proxy"; - jsonData.implementation = "prometheus"; url = "https://${alertmanager.domain}"; - } - { + jsonData.implementation = "prometheus"; + }) + (mkIf loki.enable { name = "Loki"; type = "loki"; access = "proxy"; url = "https://${loki.domain}"; isDefault = true; - } - { + }) + (mkIf prometheus.enable { name = "Prometheus"; type = "prometheus"; access = "proxy"; url = "https://${prometheus.domain}"; - } - (mkIf config.nixfiles.modules.redis.enable { + }) + (mkIf redis.enable { name = "Redis"; type = "redis-datasource"; access = "proxy"; @@ -60,11 +60,23 @@ in { jsonData.client = "standalone"; }) ]; - datasources.settings.deleteDatasources = [ - { - name = "PostgreSQL"; + datasources.settings.deleteDatasources = with config.nixfiles.modules; [ + (mkIf (!alertmanager.enable) { + name = "Alertmanager"; orgId = 1; - } + }) + (mkIf (!loki.enable) { + name = "Loki"; + orgId = 1; + }) + (mkIf (!prometheus.enable) { + name = "Prometheus"; + orgId = 1; + }) + (mkIf (!redis.enable) { + name = "Redis"; + orgId = 1; + }) ]; # https://grafana.com/docs/grafana/latest/administration/provisioning/#dashboards diff --git a/modules/nixos/thunderbird.nix b/modules/nixos/thunderbird.nix index c534271..29ea9c9 100644 --- a/modules/nixos/thunderbird.nix +++ b/modules/nixos/thunderbird.nix @@ -26,10 +26,12 @@ in { "app.donation.eoy.version.viewed" = 999; "browser.display.background_color" = base00; "browser.display.background_color.dark" = base00; - "browser.display.document_color_use" = 2; + "browser.display.document_color_use" = 1; # Corresponds to "Never". "browser.display.foreground_color" = base05; "browser.display.foreground_color.dark" = base05; - "browser.display.use_system_colors" = false; + "browser.display.use_system_colors" = true; + "browser.visited_color" = base0E; + "browser.visited_color.dark" = base0E; "editor.background_color" = base00; "editor.editor.active_link_color" = base16; "editor.followed_link_color" = base0E; |