about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/common/alacritty.nix (renamed from modules/nixfiles/alacritty.nix)0
-rw-r--r--modules/common/aria2.nix (renamed from modules/nixfiles/aria2.nix)0
-rw-r--r--modules/common/bat.nix (renamed from modules/nixfiles/bat.nix)0
-rw-r--r--modules/common/beets.nix (renamed from modules/nixfiles/beets.nix)0
-rw-r--r--modules/common/chromium.nix (renamed from modules/nixfiles/chromium.nix)0
-rw-r--r--modules/common/common/default.nix (renamed from modules/nixfiles/common/default.nix)0
-rw-r--r--modules/common/common/documentation.nix (renamed from modules/nixfiles/common/documentation.nix)0
-rw-r--r--modules/common/common/home-manager.nix (renamed from modules/nixfiles/common/home-manager.nix)0
-rw-r--r--modules/common/common/locale.nix (renamed from modules/nixfiles/common/locale.nix)0
-rw-r--r--modules/common/common/networking.nix (renamed from modules/nixfiles/common/networking.nix)0
-rw-r--r--modules/common/common/nix/default.nix (renamed from modules/nixfiles/common/nix/default.nix)6
-rw-r--r--modules/common/common/nix/patches/alejandra-no-ads.patch (renamed from modules/nixfiles/common/nix/patches/alejandra-no-ads.patch)0
-rw-r--r--modules/common/common/shell/default.nix (renamed from modules/nixfiles/common/shell/default.nix)13
-rw-r--r--modules/common/common/shell/functions.bash (renamed from modules/nixfiles/common/shell/functions.bash)0
-rw-r--r--modules/common/common/users.nix (renamed from modules/nixfiles/common/users.nix)0
-rw-r--r--modules/common/curl.nix (renamed from modules/nixfiles/curl.nix)0
-rw-r--r--modules/common/default.nix (renamed from modules/nixfiles/default.nix)2
-rw-r--r--modules/common/direnv.nix (renamed from modules/nixfiles/direnv.nix)0
-rw-r--r--modules/common/emacs/default.nix163
-rw-r--r--modules/common/emacs/doom/config.el (renamed from modules/nixfiles/emacs/doom/config.el)14
-rw-r--r--modules/common/emacs/doom/init.el (renamed from modules/nixfiles/emacs/doom/init.el)24
-rw-r--r--modules/common/emacs/doom/packages.el (renamed from modules/nixfiles/emacs/doom/packages.el)2
-rw-r--r--modules/common/fonts.nix (renamed from modules/nixfiles/fonts.nix)0
-rw-r--r--modules/common/git.nix (renamed from modules/nixfiles/git.nix)0
-rw-r--r--modules/common/gnupg.nix (renamed from modules/nixfiles/gnupg.nix)0
-rw-r--r--modules/common/htop.nix (renamed from modules/nixfiles/htop.nix)0
-rw-r--r--modules/common/mpv.nix (renamed from modules/nixfiles/mpv.nix)0
-rw-r--r--modules/common/nmap.nix (renamed from modules/nixfiles/nmap.nix)0
-rw-r--r--modules/common/openconnect.nix (renamed from modules/nixfiles/openconnect.nix)0
-rw-r--r--modules/common/openssh.nix (renamed from modules/nixfiles/openssh.nix)0
-rw-r--r--modules/common/password-store.nix (renamed from modules/nixfiles/password-store.nix)0
-rw-r--r--modules/common/profiles/default.nix (renamed from modules/nixfiles/profiles/default.nix)0
-rw-r--r--modules/common/profiles/dev/containers.nix (renamed from modules/nixfiles/profiles/dev/containers.nix)2
-rw-r--r--modules/common/profiles/dev/default.nix (renamed from modules/nixfiles/profiles/dev/default.nix)0
-rw-r--r--modules/common/profiles/dev/editorconfig.ini (renamed from modules/nixfiles/profiles/dev/editorconfig.ini)0
-rw-r--r--modules/common/profiles/dev/gdbinit (renamed from modules/nixfiles/profiles/dev/gdbinit)0
-rw-r--r--modules/common/profiles/dev/ghci.conf (renamed from modules/nixfiles/profiles/dev/ghci.conf)0
-rw-r--r--modules/common/profiles/dev/pystartup.py (renamed from modules/nixfiles/profiles/dev/pystartup.py)0
-rw-r--r--modules/common/profiles/dev/sql.nix (renamed from modules/nixfiles/profiles/dev/sql.nix)0
-rw-r--r--modules/common/profiles/headful.nix (renamed from modules/nixfiles/profiles/headful.nix)1
-rw-r--r--modules/common/profiles/headless.nix (renamed from modules/nixfiles/profiles/headless.nix)0
-rw-r--r--modules/common/qutebrowser.nix (renamed from modules/nixfiles/qutebrowser.nix)0
-rw-r--r--modules/common/subversion.nix (renamed from modules/nixfiles/subversion.nix)0
-rw-r--r--modules/common/tmux.nix (renamed from modules/nixfiles/tmux.nix)0
-rw-r--r--modules/common/vim/default.nix (renamed from modules/nixfiles/vim/default.nix)39
-rw-r--r--modules/common/vim/rc.vim (renamed from modules/nixfiles/vim/rc.vim)5
-rw-r--r--modules/common/vscode.nix (renamed from modules/nixfiles/vscode.nix)0
-rw-r--r--modules/common/wget.nix (renamed from modules/nixfiles/wget.nix)0
-rw-r--r--modules/common/zathura.nix (renamed from modules/nixfiles/zathura.nix)5
-rw-r--r--modules/nixfiles/emacs/default.nix137
-rw-r--r--modules/nixos/default.nix2
-rw-r--r--modules/nixos/emacs.nix2
-rw-r--r--modules/nixos/firefox/default.nix (renamed from modules/nixfiles/firefox/default.nix)0
-rw-r--r--modules/nixos/firefox/userChrome.css (renamed from modules/nixfiles/firefox/userChrome.css)0
-rw-r--r--modules/nixos/firefox/userContent.css (renamed from modules/nixfiles/firefox/userContent.css)0
-rw-r--r--modules/nixos/git/default.nix57
-rw-r--r--modules/nixos/mpd.nix (renamed from modules/nixfiles/mpd.nix)0
-rw-r--r--modules/nixos/openssh.nix18
-rw-r--r--modules/nixos/profiles/headful.nix1
59 files changed, 236 insertions, 257 deletions
diff --git a/modules/nixfiles/alacritty.nix b/modules/common/alacritty.nix
index 142f6c5..142f6c5 100644
--- a/modules/nixfiles/alacritty.nix
+++ b/modules/common/alacritty.nix
diff --git a/modules/nixfiles/aria2.nix b/modules/common/aria2.nix
index f33acb9..f33acb9 100644
--- a/modules/nixfiles/aria2.nix
+++ b/modules/common/aria2.nix
diff --git a/modules/nixfiles/bat.nix b/modules/common/bat.nix
index 2b31d16..2b31d16 100644
--- a/modules/nixfiles/bat.nix
+++ b/modules/common/bat.nix
diff --git a/modules/nixfiles/beets.nix b/modules/common/beets.nix
index 83cbff1..83cbff1 100644
--- a/modules/nixfiles/beets.nix
+++ b/modules/common/beets.nix
diff --git a/modules/nixfiles/chromium.nix b/modules/common/chromium.nix
index 4f0ae12..4f0ae12 100644
--- a/modules/nixfiles/chromium.nix
+++ b/modules/common/chromium.nix
diff --git a/modules/nixfiles/common/default.nix b/modules/common/common/default.nix
index 2bfe7e8..2bfe7e8 100644
--- a/modules/nixfiles/common/default.nix
+++ b/modules/common/common/default.nix
diff --git a/modules/nixfiles/common/documentation.nix b/modules/common/common/documentation.nix
index 55f6138..55f6138 100644
--- a/modules/nixfiles/common/documentation.nix
+++ b/modules/common/common/documentation.nix
diff --git a/modules/nixfiles/common/home-manager.nix b/modules/common/common/home-manager.nix
index b28260a..b28260a 100644
--- a/modules/nixfiles/common/home-manager.nix
+++ b/modules/common/common/home-manager.nix
diff --git a/modules/nixfiles/common/locale.nix b/modules/common/common/locale.nix
index bcb577a..bcb577a 100644
--- a/modules/nixfiles/common/locale.nix
+++ b/modules/common/common/locale.nix
diff --git a/modules/nixfiles/common/networking.nix b/modules/common/common/networking.nix
index e5d27d8..e5d27d8 100644
--- a/modules/nixfiles/common/networking.nix
+++ b/modules/common/common/networking.nix
diff --git a/modules/nixfiles/common/nix/default.nix b/modules/common/common/nix/default.nix
index 5ce54f9..0898457 100644
--- a/modules/nixfiles/common/nix/default.nix
+++ b/modules/common/common/nix/default.nix
@@ -96,7 +96,13 @@ with lib; {
           patches = [./patches/alejandra-no-ads.patch];
         });
 
+        logcli = super.grafana-loki.overrideAttrs (_: _: {
+          subPackages = ["cmd/logcli"];
+        });
+
         inherit (pkgsPR "215704" "sha256-o2F/ZAugljJKlVIAHMTBK6+Lj6BiBwteA5OuaWPKXm0=") dendrite;
+
+        inherit (pkgsPR "216465" "sha256-ik3e+KM27hGkKWTOOUWj1YtiqHTJvl04dx0/X08P1A0=") amdvlk;
       }
       // (with super; let
         np = nodePackages;
diff --git a/modules/nixfiles/common/nix/patches/alejandra-no-ads.patch b/modules/common/common/nix/patches/alejandra-no-ads.patch
index 6eaac66..6eaac66 100644
--- a/modules/nixfiles/common/nix/patches/alejandra-no-ads.patch
+++ b/modules/common/common/nix/patches/alejandra-no-ads.patch
diff --git a/modules/nixfiles/common/shell/default.nix b/modules/common/common/shell/default.nix
index 6ed8ff0..1eebfa2 100644
--- a/modules/nixfiles/common/shell/default.nix
+++ b/modules/common/common/shell/default.nix
@@ -30,6 +30,19 @@ with lib; {
         initExtra = ''
           set -o notify
 
+          if [ "$TERM" != "dumb" ] || [ -n "$INSIDE_EMACS" ]; then
+            PROMPT_COLOR="1;31m"
+            ((UID)) && PROMPT_COLOR="1;32m"
+            if [ -n "$INSIDE_EMACS" ] || [ "$TERM" = "eterm" ] || [ "$TERM" = "eterm-color" ]; then
+              PS1="\n\[\033[$PROMPT_COLOR\][\u@\h:\w]\\$\[\033[0m\] "
+            else
+              PS1="\n\[\033[$PROMPT_COLOR\][\[\e]0;\u@\h: \w\a\]\u@\h:\w]\\$\[\033[0m\] "
+            fi
+            if test "$TERM" = "xterm"; then
+              PS1="\[\033]2;\h:\u:\w\007\]$PS1"
+            fi
+          fi
+
           ${readFile ./functions.bash}
 
           GRC_ALIASES=true
diff --git a/modules/nixfiles/common/shell/functions.bash b/modules/common/common/shell/functions.bash
index c18104f..c18104f 100644
--- a/modules/nixfiles/common/shell/functions.bash
+++ b/modules/common/common/shell/functions.bash
diff --git a/modules/nixfiles/common/users.nix b/modules/common/common/users.nix
index aee0e38..aee0e38 100644
--- a/modules/nixfiles/common/users.nix
+++ b/modules/common/common/users.nix
diff --git a/modules/nixfiles/curl.nix b/modules/common/curl.nix
index e7bee31..e7bee31 100644
--- a/modules/nixfiles/curl.nix
+++ b/modules/common/curl.nix
diff --git a/modules/nixfiles/default.nix b/modules/common/default.nix
index d4e5e26..e6040cd 100644
--- a/modules/nixfiles/default.nix
+++ b/modules/common/default.nix
@@ -9,12 +9,10 @@ _: {
     ./curl.nix
     ./direnv.nix
     ./emacs
-    ./firefox
     ./fonts.nix
     ./git.nix
     ./gnupg.nix
     ./htop.nix
-    ./mpd.nix
     ./mpv.nix
     ./nmap.nix
     ./openssh.nix
diff --git a/modules/nixfiles/direnv.nix b/modules/common/direnv.nix
index b235cee..b235cee 100644
--- a/modules/nixfiles/direnv.nix
+++ b/modules/common/direnv.nix
diff --git a/modules/common/emacs/default.nix b/modules/common/emacs/default.nix
new file mode 100644
index 0000000..7395c51
--- /dev/null
+++ b/modules/common/emacs/default.nix
@@ -0,0 +1,163 @@
+{
+  config,
+  inputs,
+  lib,
+  pkgs,
+  pkgsStable,
+  this,
+  ...
+}:
+with lib; let
+  cfg = config.nixfiles.modules.emacs;
+in {
+  options.nixfiles.modules.emacs.enable = mkEnableOption "GNU Emacs";
+
+  config = mkIf cfg.enable {
+    nixfiles.modules = {
+      fonts.enable = true;
+      git.client.enable = true;
+      gnupg.enable = true;
+    };
+
+    hm = {
+      xdg.configFile = {
+        "doom/init.el".source = ./doom/init.el;
+        "doom/packages.el".source = ./doom/packages.el;
+        "doom/config.el" = {
+          text = concatStringsSep "\n" [
+            (let
+              # NOTE gopls will require the "go" executable which must be provided
+              # by the project's flake/shell.
+              extraBins = with pkgs;
+                [
+                  enchant # :checkers (spell +enchant)
+                  (python3.withPackages (p:
+                    with p; [
+                      black # :lang python :editor format
+                      isort # :lang python
+                      pyflakes # :lang python
+                      python-lsp-server # :lang (python +lsp)
+                    ]))
+                  asmfmt # :editor format
+                  bash-language-server # :lang (sh +lsp)
+                  clang-tools # :lang (cc +lsp) :editor format
+                  cmake-format # :lang cc :editor format
+                  cmigemo # :lang japanese
+                  css-language-server # :lang (web +lsp)
+                  dhall-language-server # :lang (dhall +lsp)
+                  dockerfile-language-server # :tools (docker +lsp)
+                  editorconfig # :tools editorconfig
+                  fd # doom!
+                  gnuplot # :lang (org +gnuplot)
+                  gnutls # doom!
+                  go-language-server # :lang (go +lsp)
+                  gomodifytags # :lang go
+                  gore # :lang go
+                  gotests # :lang go
+                  gotools # :lang go
+                  graphviz # :lang (org +roam2) :lang plantuml
+                  html-language-server # :lang (web +lsp)
+                  html-tidy # :lang web
+                  jre # :lang plantuml
+                  json-language-server # :lang (json +lsp)
+                  nix-language-server # :lang (nix +lsp)
+                  nixfmt # :lang nix :editor format
+                  nodePackages.js-beautify # :lang web
+                  nodePackages.prettier # :editor format
+                  nodePackages.stylelint # :lang web
+                  nodejs # :tools debugger
+                  pandoc # :lang org markdown latex
+                  pinentry-emacs # doom!
+                  pre-commit # :tools magit
+                  ripgrep # doom!
+                  rust-analyzer # :lang (rust +lsp)
+                  rustfmt # :lang rust
+                  shellcheck # :lang sh
+                  shfmt # :lang sh :editor format
+                  sqlite # :lang (org +roam2) :tools lookup
+                  texlab # lang (tex +lsp)
+                  texlive.combined.scheme-full # :lang org tex
+                  unzip # :tools debugger
+                  wordnet # :tools (lookup +dictionary +offline)
+                  yaml-language-server # :lang (yaml +lsp)
+                  zls # :lang (zig +lsp)
+                  zstd # :emacs undo
+                ]
+                ++ (
+                  #
+                  # GDB doesn't support[1] Apple Silicon on MacOS.
+                  #
+                  # [1]: https://inbox.sourceware.org/gdb/6b48224b-9e2e-518d-793b-df4fc5514884@arm.com/
+                  if (this.system != "aarch64-darwin")
+                  then [gdb] # :tools debugger
+                  else [lldb] # :tools debugger
+                )
+                ++ optionals (!pkgs.stdenv.isDarwin)
+                [
+                  # NOTE Haskell is pretty much broken every couple of days on
+                  # MacOS and I usually don't write anything in Haskell while
+                  # I'm on my work laptop, so... ShellCheck seems to be working,
+                  # though.
+                  haskellPackages.ormolu # :lang haskell :editor format
+                  haskellPackages.haskell-language-server # :lang (haskell +lsp)
+                  haskellPackages.cabal-fmt # :lang haskell :editor format
+                  haskellPackages.cabal-install # :lang haskell
+                  haskellPackages.hoogle # :lang haskell
+                ];
+            in ''
+              ;; This will integrate packages which are required by various
+              ;; modules without polluting the user's profile.
+              (setq exec-path (append exec-path '(${
+                concatMapStringsSep " " (x: ''"${x}/bin"'') extraBins
+              })))
+              (setenv "PATH" (concat (getenv "PATH") ":${
+                concatMapStringsSep ":" (x: "${x}/bin") extraBins
+              }"))
+
+              ;; Font must be set to N+2 because otherwise it looks too small.
+              (setq doom-font (font-spec :family "${config.fontScheme.monospaceFont.family}"
+                                          :size ${toString (config.fontScheme.monospaceFont.size + 2)})
+                    doom-unicode-font doom-font)
+
+              (setq user-full-name "${my.fullname}"
+                    user-mail-address "${my.email}")
+
+              ;; :app irc
+              (setq circe-default-nick "${my.username}"
+                    circe-default-realname "${my.email}"
+                    circe-default-user circe-default-nick)
+
+              ;; :lang plantuml
+              (setq org-plantuml-jar-path "${pkgs.plantuml}/lib/plantuml.jar")
+
+              ;; :input japanese
+              (setq migemo-dictionary "${pkgs.cmigemo}/share/migemo/utf-8/migemo-dict")
+
+              ;; :input japanese
+              (setq skk-large-jisyo "${pkgs.skk-dicts}/share/skk/SKK-JISYO.L")
+            '')
+            (builtins.readFile ./doom/config.el)
+          ];
+          onChange = with config.hm.programs; ''
+            if [[ -x "''${XDG_CONFIG_HOME:~/.config}/emacs/bin/doom" ]]; then
+               oldpath="$PATH"
+               export PATH="''${PATH:-/bin}:${emacs.package}/bin:${git.package}/bin"
+
+               "''${XDG_CONFIG_HOME:~/.config}/emacs/bin/doom" sync
+
+               export PATH="$oldpath"
+               unset oldpath
+            fi
+          '';
+        };
+      };
+
+      programs.emacs = {
+        enable = true;
+        package = pkgs.emacs28; # Pin to avoid surprises.
+        # For some reason latest libvterm is not picked up by Emacs.
+        extraPackages = _: with pkgsStable.emacsPackages; [vterm];
+      };
+    };
+  };
+}
diff --git a/modules/nixfiles/emacs/doom/config.el b/modules/common/emacs/doom/config.el
index 9fa9984..9284e0b 100644
--- a/modules/nixfiles/emacs/doom/config.el
+++ b/modules/common/emacs/doom/config.el
@@ -1,5 +1,3 @@
-;;; config.el -*- lexical-binding: t; -*-
-
 ;;
 ;;; Misc
 ;;
@@ -80,7 +78,7 @@
 ;;; Haskell
 ;;
 
-(setq lsp-haskell-formatting-provider "brittany")
+(setq lsp-haskell-formatting-provider "ormolu")
 
 ;;
 ;;; Nix
@@ -95,9 +93,17 @@
 
 ;;
 ;;; YAML
-
 ;;
 
+(add-hook! 'yaml-mode-hook
+  (defun +disable-flycheck-for-yaml-helm-templates ()
+    (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))))
+
 (setq-hook! 'yaml-mode-hook +format-with-lsp nil)
 
 ;;
diff --git a/modules/nixfiles/emacs/doom/init.el b/modules/common/emacs/doom/init.el
index 1016f40..cdab069 100644
--- a/modules/nixfiles/emacs/doom/init.el
+++ b/modules/common/emacs/doom/init.el
@@ -1,5 +1,3 @@
-;;; init.el -*- lexical-binding: t; -*-
-
 (doom! :input
        ;; japanese
 
@@ -12,6 +10,7 @@
        doom
        ;; doom-dashboard
        ;; doom-quit
+       ;; emoji
        hl-todo
        indent-guides
        ;; ligatures
@@ -20,12 +19,10 @@
        ophints
        (popup +defaults)
        ;; tabs
-       ;; (treemacs +lsp)
        ;; unicode
        (vc-gutter +diff-hl +pretty)
        window-select
        workspaces
-       zen
 
        :editor
        (evil +everywhere)
@@ -36,7 +33,7 @@
        ;; multiple-cursors
        parinfer
        ;; rotate-text
-       ;; snippets
+       snippets
        word-wrap
 
        :emacs
@@ -52,10 +49,10 @@
 
        :checkers
        syntax
-       (spell +aspell
+       (spell +enchant
               +everywhere
               +flyspell)
-       ;; grammar
+       grammar
 
        :tools
        ansible
@@ -64,6 +61,7 @@
        (docker +lsp)
        editorconfig
        (eval +overlay)
+       gist
        (lookup +dictionary +offline)
        (lsp +peek)
        (magit +forge)
@@ -72,7 +70,7 @@
        ;; pdf
        terraform
        tree-sitter
-       ;; upload
+       upload
 
        :os
        (:if IS-MAC macos)
@@ -87,10 +85,10 @@
        (emacs-lisp +lsp +tree-sitter)
        (go +lsp +tree-sitter)
        ;; graphql
-       (haskell +lsp +tree-sitter)
+       (:if IS-LINUX (haskell +lsp +tree-sitter))
        (java +lsp +tree-sitter)
        (javascript +lsp +tree-sitter)
-       json
+       (json +lsp +tree-sitter)
        (kotlin +lsp +tree-sitter)
        (latex +lsp +tree-sittter)
        (markdown +lsp +tree-sitter)
@@ -98,13 +96,13 @@
        (org +pandoc +roam2)
        plantuml
        (python +lsp +tree-sitter)
-       (racket +lsp +tree-sitter)
+       (:if IS-LINUX (racket +lsp +tree-sitter))
        ;; rst
        (rust +lsp +tree-sitter)
-       (scheme +lsp +tree-sitter +racket)
+       (:if IS-LINUX (scheme +lsp +tree-sitter +racket))
        (sh +lsp +tree-sitter)
        web
-       yaml
+       (yaml +lsp +tree-sitter)
        (zig +lsp +tree-sitter)
 
        :email
diff --git a/modules/nixfiles/emacs/doom/packages.el b/modules/common/emacs/doom/packages.el
index d3e6354..298a203 100644
--- a/modules/nixfiles/emacs/doom/packages.el
+++ b/modules/common/emacs/doom/packages.el
@@ -1,5 +1,3 @@
-;;; packages.el -*- lexical-binding: t; -*-
-
 (disable-packages! writegood-mode)
 
 (unpin! org-roam)
diff --git a/modules/nixfiles/fonts.nix b/modules/common/fonts.nix
index 483de0d..483de0d 100644
--- a/modules/nixfiles/fonts.nix
+++ b/modules/common/fonts.nix
diff --git a/modules/nixfiles/git.nix b/modules/common/git.nix
index 2c1dd1f..2c1dd1f 100644
--- a/modules/nixfiles/git.nix
+++ b/modules/common/git.nix
diff --git a/modules/nixfiles/gnupg.nix b/modules/common/gnupg.nix
index c0f10f9..c0f10f9 100644
--- a/modules/nixfiles/gnupg.nix
+++ b/modules/common/gnupg.nix
diff --git a/modules/nixfiles/htop.nix b/modules/common/htop.nix
index bf3f1e4..bf3f1e4 100644
--- a/modules/nixfiles/htop.nix
+++ b/modules/common/htop.nix
diff --git a/modules/nixfiles/mpv.nix b/modules/common/mpv.nix
index afab1dd..afab1dd 100644
--- a/modules/nixfiles/mpv.nix
+++ b/modules/common/mpv.nix
diff --git a/modules/nixfiles/nmap.nix b/modules/common/nmap.nix
index 73f948c..73f948c 100644
--- a/modules/nixfiles/nmap.nix
+++ b/modules/common/nmap.nix
diff --git a/modules/nixfiles/openconnect.nix b/modules/common/openconnect.nix
index 780f93f..780f93f 100644
--- a/modules/nixfiles/openconnect.nix
+++ b/modules/common/openconnect.nix
diff --git a/modules/nixfiles/openssh.nix b/modules/common/openssh.nix
index 4b80809..4b80809 100644
--- a/modules/nixfiles/openssh.nix
+++ b/modules/common/openssh.nix
diff --git a/modules/nixfiles/password-store.nix b/modules/common/password-store.nix
index 1de8a55..1de8a55 100644
--- a/modules/nixfiles/password-store.nix
+++ b/modules/common/password-store.nix
diff --git a/modules/nixfiles/profiles/default.nix b/modules/common/profiles/default.nix
index 06ddaf4..06ddaf4 100644
--- a/modules/nixfiles/profiles/default.nix
+++ b/modules/common/profiles/default.nix
diff --git a/modules/nixfiles/profiles/dev/containers.nix b/modules/common/profiles/dev/containers.nix
index 9119140..cc24ab3 100644
--- a/modules/nixfiles/profiles/dev/containers.nix
+++ b/modules/common/profiles/dev/containers.nix
@@ -33,7 +33,6 @@ in {
           clusterctl
           cmctl
           datree
-          fluxcd
           helm
           istioctl
           kubeconform
@@ -52,7 +51,6 @@ in {
           skopeo
           stern
           telepresence
-          terraform
           werf
         ];
       };
diff --git a/modules/nixfiles/profiles/dev/default.nix b/modules/common/profiles/dev/default.nix
index b05aeac..b05aeac 100644
--- a/modules/nixfiles/profiles/dev/default.nix
+++ b/modules/common/profiles/dev/default.nix
diff --git a/modules/nixfiles/profiles/dev/editorconfig.ini b/modules/common/profiles/dev/editorconfig.ini
index 17b0317..17b0317 100644
--- a/modules/nixfiles/profiles/dev/editorconfig.ini
+++ b/modules/common/profiles/dev/editorconfig.ini
diff --git a/modules/nixfiles/profiles/dev/gdbinit b/modules/common/profiles/dev/gdbinit
index e266236..e266236 100644
--- a/modules/nixfiles/profiles/dev/gdbinit
+++ b/modules/common/profiles/dev/gdbinit
diff --git a/modules/nixfiles/profiles/dev/ghci.conf b/modules/common/profiles/dev/ghci.conf
index d672167..d672167 100644
--- a/modules/nixfiles/profiles/dev/ghci.conf
+++ b/modules/common/profiles/dev/ghci.conf
diff --git a/modules/nixfiles/profiles/dev/pystartup.py b/modules/common/profiles/dev/pystartup.py
index adde66c..adde66c 100644
--- a/modules/nixfiles/profiles/dev/pystartup.py
+++ b/modules/common/profiles/dev/pystartup.py
diff --git a/modules/nixfiles/profiles/dev/sql.nix b/modules/common/profiles/dev/sql.nix
index 7a2a09c..7a2a09c 100644
--- a/modules/nixfiles/profiles/dev/sql.nix
+++ b/modules/common/profiles/dev/sql.nix
diff --git a/modules/nixfiles/profiles/headful.nix b/modules/common/profiles/headful.nix
index 1c1f43b..eec14c5 100644
--- a/modules/nixfiles/profiles/headful.nix
+++ b/modules/common/profiles/headful.nix
@@ -95,6 +95,7 @@ in {
     };
 
     environment.systemPackages = with pkgs; [
+      (aspellWithDicts (p: with p; [en ru]))
       arping
       dnsutils
       inetutils
diff --git a/modules/nixfiles/profiles/headless.nix b/modules/common/profiles/headless.nix
index cc7c326..cc7c326 100644
--- a/modules/nixfiles/profiles/headless.nix
+++ b/modules/common/profiles/headless.nix
diff --git a/modules/nixfiles/qutebrowser.nix b/modules/common/qutebrowser.nix
index 68a41a5..68a41a5 100644
--- a/modules/nixfiles/qutebrowser.nix
+++ b/modules/common/qutebrowser.nix
diff --git a/modules/nixfiles/subversion.nix b/modules/common/subversion.nix
index 077f449..077f449 100644
--- a/modules/nixfiles/subversion.nix
+++ b/modules/common/subversion.nix
diff --git a/modules/nixfiles/tmux.nix b/modules/common/tmux.nix
index e978f72..e978f72 100644
--- a/modules/nixfiles/tmux.nix
+++ b/modules/common/tmux.nix
diff --git a/modules/nixfiles/vim/default.nix b/modules/common/vim/default.nix
index db46d34..0328e10 100644
--- a/modules/nixfiles/vim/default.nix
+++ b/modules/common/vim/default.nix
@@ -2,6 +2,7 @@
   config,
   lib,
   pkgs,
+  this,
   ...
 }:
 with lib; let
@@ -11,29 +12,21 @@ in {
 
   config = mkIf cfg.enable {
     programs.vim.package = with pkgs;
-      ((vim_configurable.override {features = "normal";}
-          // mapListToAttrs false [
-            "cscopeSupport"
-            "darwinSupport"
-            "guiSupport"
-            "luaSupport"
-            "multibyteSupport"
-            "netbeansSupport"
-            "nlsSupport"
-            "perlSupport"
-            "pythonSupport"
-            "rubySupport"
-            "tclSupport"
-            "ximSupport"
-          ])
-        .overrideAttrs (_: super: {
-          configureFlags =
-            super.configureFlags
-            ++ [
-              "--enable-gpm=no"
-              "--enable-gui=no"
-            ];
-        }))
+      (vim_configurable.override {
+        features = "normal";
+        cscopeSupport = false;
+        darwinSupport = pkgs.stdenv.isDarwin;
+        guiSupport = false;
+        luaSupport = false;
+        multibyteSupport = false;
+        netbeansSupport = false;
+        nlsSupport = false;
+        perlSupport = false;
+        pythonSupport = false;
+        rubySupport = false;
+        tclSupport = false;
+        ximSupport = false;
+      })
       .customize {
         name = "vim";
         vimrcConfig = {
diff --git a/modules/nixfiles/vim/rc.vim b/modules/common/vim/rc.vim
index 1657c6d..945643a 100644
--- a/modules/nixfiles/vim/rc.vim
+++ b/modules/common/vim/rc.vim
@@ -9,6 +9,7 @@ let g:netrw_dirhistmax = 0
 set autoread
 set backspace=indent,eol,start
 
+set clipboard=unnamedplus
 set diffopt+=iwhite
 set hidden
 set history=256
@@ -98,10 +99,6 @@ set tabstop=4
 
 autocmd BufEnter *.* :set colorcolumn=
 
-if has('unnamedplus')
-    set clipboard^=unnamedplus
-endif
-
 if &t_Co == 8 && $TERM !~# '^Eterm'
     set t_Co=16
 endif
diff --git a/modules/nixfiles/vscode.nix b/modules/common/vscode.nix
index 6671973..6671973 100644
--- a/modules/nixfiles/vscode.nix
+++ b/modules/common/vscode.nix
diff --git a/modules/nixfiles/wget.nix b/modules/common/wget.nix
index 9a16fcc..9a16fcc 100644
--- a/modules/nixfiles/wget.nix
+++ b/modules/common/wget.nix
diff --git a/modules/nixfiles/zathura.nix b/modules/common/zathura.nix
index 1a0b39a..f78a9e9 100644
--- a/modules/nixfiles/zathura.nix
+++ b/modules/common/zathura.nix
@@ -112,10 +112,7 @@ in {
           scroll-wrap = true;
           scroll-page-aware = false;
 
-          selection-clipboard =
-            if config.nixfiles.modules.kde.enable
-            then "clipboard"
-            else "primary";
+          selection-clipboard = "clipboard";
           selection-notification = false;
         };
     };
diff --git a/modules/nixfiles/emacs/default.nix b/modules/nixfiles/emacs/default.nix
deleted file mode 100644
index 975c809..0000000
--- a/modules/nixfiles/emacs/default.nix
+++ /dev/null
@@ -1,137 +0,0 @@
-{
-  config,
-  inputs,
-  lib,
-  pkgs,
-  this,
-  ...
-}:
-with lib; let
-  cfg = config.nixfiles.modules.emacs;
-in {
-  options.nixfiles.modules.emacs.enable = mkEnableOption "GNU Emacs";
-
-  config = mkIf cfg.enable {
-    nixfiles.modules = {
-      fonts.enable = true;
-      git.client.enable = true;
-      gnupg.enable = true;
-    };
-
-    hm = {
-      imports = [inputs.nix-doom-emacs.hmModule];
-
-      programs.doom-emacs = {
-        enable = true;
-        doomPrivateDir = ./doom;
-        emacsPackage = pkgs.emacs28; # The package is pinned to avoid surprises.
-        extraPackages = with pkgs; [
-          mu # :email mu4e
-        ];
-        extraConfig = let
-          # NOTE gopls will require the "go" executable which must be provided
-          # by the project's flake/shell.
-          extraBins = with pkgs;
-            [
-              (aspellWithDicts (p: with p; [en ru])) # :checkers (spell +aspell)
-              (python3.withPackages (p:
-                with p; [
-                  # :lang python :ui (treemacs +lsp)
-                  black # :lang python :editor format
-                  isort # :lang python
-                  pyflakes # :lang python
-                  python-lsp-server # :lang (python +lsp)
-                ]))
-              asmfmt # :editor format
-              bash-language-server # :lang (sh +lsp)
-              clang-tools # :lang (cc +lsp) :editor format
-              cmake-format # :lang cc :editor format
-              cmigemo # :lang japanese
-              css-language-server # :lang (web +lsp)
-              dhall-language-server # :lang (dhall +lsp)
-              dockerfile-language-server # :tools (docker +lsp)
-              editorconfig # :tools editorconfig
-              fd # doom!
-              gnuplot # :lang (org +gnuplot)
-              gnutls # doom!
-              go-language-server # :lang (go +lsp)
-              gomodifytags # :lang go
-              gore # :lang go
-              gotests # :lang go
-              graphviz # :lang (org +roam2) :lang plantuml
-              haskellPackages.haskell-language-server # :lang (haskell +lsp)
-              haskellPackages.ormolu # :lang haskell :editor format
-              haskellPackages.cabal-fmt # :lang haskell :editor format
-              haskellPackages.cabal-install # :lang haskell
-              haskellPackages.hoogle # :lang haskell
-              html-language-server # :lang (web +lsp)
-              html-tidy # :lang web
-              jre # :lang plantuml
-              json-language-server # :lang (json +lsp)
-              nix-language-server # :lang (nix +lsp)
-              nixfmt # :lang nix :editor format
-              nodePackages.js-beautify # :lang web
-              nodePackages.prettier # :editor format
-              nodePackages.stylelint # :lang web
-              nodejs # :tools debugger
-              pandoc # :lang org markdown latex
-              pinentry-emacs # doom!
-              pre-commit # :tools magit
-              ripgrep # doom!
-              rust-analyzer # :lang (rust +lsp)
-              rustfmt # :lang rust
-              shellcheck # :lang sh
-              shfmt # :lang sh :editor format
-              sqlite # :lang (org +roam2) :tools lookup
-              texlab # lang (tex +lsp)
-              texlive.combined.scheme-full # :lang org tex
-              unzip # :tools debugger
-              wordnet # :tools (lookup +dictionary +offline)
-              yaml-language-server # :lang (yaml +lsp)
-              zls # :lang (zig +lsp)
-              zstd # :emacs undo
-            ]
-            ++ (
-              # :tools debugger
-              if (this.system != "aarch64-darwin")
-              then [gdb]
-              else [lldb]
-            );
-        in ''
-          ;; This will integrate packages which are required by various modules
-          ;; without polluting the user's profile.
-          (setq exec-path (append exec-path '(${
-            concatMapStringsSep " " (x: ''"${x}/bin"'') extraBins
-          })))
-          (setenv "PATH" (concat (getenv "PATH") ":${
-            concatMapStringsSep ":" (x: "${x}/bin") extraBins
-          }"))
-
-          (setq custom-file (file-name-concat doom-emacs-dir "custom.el"))
-
-          ;; Font must be set to n+2 because otherwise it looks too small.
-          (setq doom-font (font-spec :family "${config.fontScheme.monospaceFont.family}"
-                                     :size ${toString (config.fontScheme.monospaceFont.size + 2)})
-                doom-unicode-font doom-font)
-
-          (setq user-full-name "${my.fullname}"
-                user-mail-address "${my.email}")
-
-          ;; :app irc
-          (setq circe-default-nick "${my.username}"
-                circe-default-realname "${my.email}"
-                circe-default-user circe-default-nick)
-
-          ;; :lang plantuml
-          (setq org-plantuml-jar-path "${pkgs.plantuml}/lib/plantuml.jar")
-
-          ;; :input japanese
-          (setq migemo-dictionary "${pkgs.cmigemo}/share/migemo/utf-8/migemo-dict")
-
-          ;; :input japanese
-          (setq skk-large-jisyo "${pkgs.skk-dicts}/share/skk/SKK-JISYO.L")
-        '';
-      };
-    };
-  };
-}
diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix
index 188a999..850d93e 100644
--- a/modules/nixos/default.nix
+++ b/modules/nixos/default.nix
@@ -12,6 +12,7 @@ _: {
     ./endlessh-go.nix
     ./endlessh.nix
     ./fail2ban.nix
+    ./firefox
     ./fonts.nix
     ./games
     ./git
@@ -27,6 +28,7 @@ _: {
     ./lxc.nix
     ./matrix
     ./monitoring
+    ./mpd.nix
     ./nextcloud.nix
     ./nginx.nix
     ./node-exporter.nix
diff --git a/modules/nixos/emacs.nix b/modules/nixos/emacs.nix
index 2db8120..e348398 100644
--- a/modules/nixos/emacs.nix
+++ b/modules/nixos/emacs.nix
@@ -17,7 +17,7 @@ in {
     nixfiles.modules.x11.enable = true;
 
     hm = {
-      programs.doom-emacs.extraConfig = mkAfter ''
+      programs.emacs.extraConfig = mkAfter ''
         (appendq! auth-sources '("${config.secrets.authinfo.path}"))
       '';
 
diff --git a/modules/nixfiles/firefox/default.nix b/modules/nixos/firefox/default.nix
index 7038773..7038773 100644
--- a/modules/nixfiles/firefox/default.nix
+++ b/modules/nixos/firefox/default.nix
diff --git a/modules/nixfiles/firefox/userChrome.css b/modules/nixos/firefox/userChrome.css
index 58e450e..58e450e 100644
--- a/modules/nixfiles/firefox/userChrome.css
+++ b/modules/nixos/firefox/userChrome.css
diff --git a/modules/nixfiles/firefox/userContent.css b/modules/nixos/firefox/userContent.css
index 2de8cde..2de8cde 100644
--- a/modules/nixfiles/firefox/userContent.css
+++ b/modules/nixos/firefox/userContent.css
diff --git a/modules/nixos/git/default.nix b/modules/nixos/git/default.nix
index 86891ae..1bf63c7 100644
--- a/modules/nixos/git/default.nix
+++ b/modules/nixos/git/default.nix
@@ -20,7 +20,7 @@ in {
     package = mkOption {
       description = "Package.";
       type = types.package;
-      default = pkgs.cgit-pink;
+      default = pkgs.cgit;
     };
   };
 
@@ -58,6 +58,8 @@ in {
                 root-desc=Homo sum, humani a me nihil alienum puto.
                 footer=
 
+                clone-url=https://${cfg.server.domain}/$CGIT_REPO_URL
+
                 logo=/cgit-custom-logo.gif
                 favicon=/cgit-custom-favicon.gif
                 css=/cgit-custom-style.css
@@ -68,7 +70,6 @@ in {
 
                 enable-git-config=1
                 enable-gitweb-owner=1
-                enable-index-owner=0
                 remove-suffix=1
 
                 readme=:README
@@ -106,63 +107,11 @@ in {
                 pkgs.writeText "custom.css" ''
                   @import url("cgit.css");
 
-                  form {
-                    display: none;
-                  }
-
                   div#cgit {
-                    max-width: 157ch;
-                    margin: auto;
                     font-family: "${config.fontScheme.monospaceFont.family}", monospace;
                     -moz-tab-size: 4;
                     tab-size: 4;
                   }
-
-                  div#cgit table#header td.sub {
-                    border-top: none;
-                  }
-
-                  div#cgit table#header td.sub.right {
-                    padding-right: 1em;
-                  }
-
-                  div#cgit table.tabs {
-                    border-bottom: none;
-                  }
-
-                  div#cgit div.content {
-                    border-bottom: none;
-                  }
-
-                  div#cgit table.list th a {
-                    color: inherit;
-                  }
-
-                  div#cgit table.list tr:nth-child(even) {
-                    background: inherit;
-                  }
-
-                  div#cgit table.list tr:hover {
-                    background: inherit;
-                  }
-
-                  div#cgit table.list tr.nohover-highlight:hover:nth-child(even) {
-                    background: inherit;
-                  }
-
-                  div#cgit table.blob td.linenumbers a:target {
-                    color: goldenrod;
-                    text-decoration: underline;
-                    outline: none;
-                  }
-
-                  div#cgit div#summary {
-                    max-width: 80ch;
-                  }
-
-                  div#cgit a.permalink {
-                    color: inherit;
-                  }
                 '';
             in ''
               alias ${css};
diff --git a/modules/nixfiles/mpd.nix b/modules/nixos/mpd.nix
index 4b49213..4b49213 100644
--- a/modules/nixfiles/mpd.nix
+++ b/modules/nixos/mpd.nix
diff --git a/modules/nixos/openssh.nix b/modules/nixos/openssh.nix
index c7a144e..6f4614c 100644
--- a/modules/nixos/openssh.nix
+++ b/modules/nixos/openssh.nix
@@ -18,16 +18,14 @@ in {
   };
 
   config = mkIf cfg.server.enable {
-    # FIXME This is mounted after the activation script is launched.
-    ark = {
-      files = [
-        "/etc/ssh/ssh_host_ed25519_key"
-        "/etc/ssh/ssh_host_ed25519_key.pub"
-        "/etc/ssh/ssh_host_rsa_key"
-        "/etc/ssh/ssh_host_rsa_key.pub"
-      ];
-      # directories = ["/etc/ssh/authorized_keys.d"];
-    };
+    # authorized_keys is not added here because it only contains my SSH keys and
+    # all non-declarative ones are located in the home directory.
+    ark.files = [
+      "/etc/ssh/ssh_host_ed25519_key"
+      "/etc/ssh/ssh_host_ed25519_key.pub"
+      "/etc/ssh/ssh_host_rsa_key"
+      "/etc/ssh/ssh_host_rsa_key.pub"
+    ];
 
     programs.mosh.enable = true;
 
diff --git a/modules/nixos/profiles/headful.nix b/modules/nixos/profiles/headful.nix
index ca604cb..ede921a 100644
--- a/modules/nixos/profiles/headful.nix
+++ b/modules/nixos/profiles/headful.nix
@@ -13,7 +13,6 @@ in {
       chromium.enable = true;
       firefox.enable = true;
       sound.enable = true;
-      x11.enable = true;
 
       dwm.enable = mkDefault false;
       kde.enable = mkDefault true;

Consider giving Nix/NixOS a try! <3