diff options
author | Azat Bahawi <azat@bahawi.net> | 2023-12-03 02:52:28 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2023-12-03 02:52:28 +0300 |
commit | cec9f7acd5e5e365563212c5144394f71dd90b27 (patch) | |
tree | 667b308a7241ab2e8f3fa4e2b53cc7888e876c68 /modules/common | |
parent | 2023-11-29 (diff) |
2023-12-03
Diffstat (limited to 'modules/common')
-rw-r--r-- | modules/common/bat.nix | 1 | ||||
-rw-r--r-- | modules/common/common/nix.nix | 2 | ||||
-rw-r--r-- | modules/common/default.nix | 1 | ||||
-rw-r--r-- | modules/common/emacs/default.nix | 29 | ||||
-rw-r--r-- | modules/common/emacs/doom/config.el | 5 | ||||
-rw-r--r-- | modules/common/eza.nix | 21 | ||||
-rw-r--r-- | modules/common/fonts.nix | 2 | ||||
-rw-r--r-- | modules/common/profiles/default.nix | 2 | ||||
-rw-r--r-- | modules/common/profiles/dev/default.nix | 3 |
9 files changed, 44 insertions, 22 deletions
diff --git a/modules/common/bat.nix b/modules/common/bat.nix index d95f709..2dc0913 100644 --- a/modules/common/bat.nix +++ b/modules/common/bat.nix @@ -13,6 +13,7 @@ in { baj = "bat --language=json --tabs 2"; bay = "bat --language=yaml --tabs 2"; bas = "bat --language=syslog"; + less = "bat"; }; hm.programs.bat = { diff --git a/modules/common/common/nix.nix b/modules/common/common/nix.nix index 39e3282..3735174 100644 --- a/modules/common/common/nix.nix +++ b/modules/common/common/nix.nix @@ -54,6 +54,8 @@ with lib; { warn-dirty = false; + keep-going = true; + substituters = [ "https://azahi.cachix.org" "https://cache.iog.io" diff --git a/modules/common/default.nix b/modules/common/default.nix index b360049..3b42031 100644 --- a/modules/common/default.nix +++ b/modules/common/default.nix @@ -7,6 +7,7 @@ _: { ./curl.nix ./direnv.nix ./emacs + ./eza.nix ./fonts.nix ./git.nix ./gnupg.nix diff --git a/modules/common/emacs/default.nix b/modules/common/emacs/default.nix index 94c7729..5402b34 100644 --- a/modules/common/emacs/default.nix +++ b/modules/common/emacs/default.nix @@ -66,13 +66,15 @@ in { extraBins = with pkgs; [ (aspellWithDicts (p: with p; [en ru])) # :checkers (spell +aspell) + # wordnet # :tools (lookup +dictionary +offline) asmfmt # :editor format - bashdb # :lang sh :tools debugger cargo # :lang rust clang-tools # :lang (cc +lsp) :editor format cmake # :lang cc :term vterm cmake-format # :lang cc :editor format cmigemo # :lang japanese + config.hm.programs.emacs.package # !doom + config.nix.package # !doom dockerfile-language-server-nodejs # :tools (docker +lsp) dockfmt # :tools docker :editor format editorconfig-core-c # :tools editorconfig @@ -137,7 +139,6 @@ in { 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) zig # :lang zig :editor format zls # :lang (zig +lsp) @@ -151,6 +152,11 @@ in { then [gdb] # :tools debugger else [lldb] # :tools debugger ); + + parinferRustLibrary = + if (hasSuffix "linux" this.system) + then "${pkgs.parinfer-rust}/lib/libparinfer_rust.so" + else "${pkgs.parinfer-rust}/lib/libparinfer_rust.dylib"; in '' ;; Integrate packages which are required by various modules ;; without polluting the user's profile. @@ -181,7 +187,7 @@ in { ;; :editor parinfer (setq parinfer-rust-auto-download nil - parinfer-rust-library "${pkgs.parinfer-rust}/lib/libparinfer_rust.so") + parinfer-rust-library "${parinferRustLibrary}") ;; :lang nix ;; HACK Trick `nix-mode' to use alejandra instead of nixfmt. @@ -239,18 +245,7 @@ in { programs = { emacs = { enable = true; - package = - (pkgs.emacs29.override (finalAttrs: { - stdenv = pkgs.useMoldLinker finalAttrs.stdenv; - })) - .overrideAttrs (_: final: { - configureFlags = - (final.configureFlags or []) - ++ [ - "--without-mailutils" - "--without-pop" - ]; - }); + package = pkgs.emacs29; }; bash.initExtra = mkAfter '' @@ -268,6 +263,10 @@ in { vterm_cmd find-file "$(realpath "''${@:-.}")" } fi + + # Not sourced from inside Emacs for some reason. Maybe it's not + # considered an interactive shell? + [[ -f ~/.profile ]] && . ~/.profile ''; }; }; diff --git a/modules/common/emacs/doom/config.el b/modules/common/emacs/doom/config.el index dee3d3d..7d92aea 100644 --- a/modules/common/emacs/doom/config.el +++ b/modules/common/emacs/doom/config.el @@ -196,8 +196,9 @@ (mapcar (lambda (server) `(,server :server-buffer-name ,server - :host "shire.net" - :port 6667 + :host "azahi.cc" + :port 6697 + :tls t :user ,(concat circe-default-user "/" server) :pass ,(lambda (&rest _) (+pass-get-secret "server/soju.manwe.shire.net/azahi")))) diff --git a/modules/common/eza.nix b/modules/common/eza.nix new file mode 100644 index 0000000..be590b4 --- /dev/null +++ b/modules/common/eza.nix @@ -0,0 +1,21 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.nixfiles.modules.eza; +in { + options.nixfiles.modules.eza.enable = mkEnableOption "eza, an alternative to ls"; + + config = mkIf cfg.enable { + nixfiles.modules.common.shell.aliases = rec { + ls = "eza --smart-group --dereference"; + ll = "${ls} --long --grid"; + la = "${ll} --header --all"; + }; + + hm.home.packages = [pkgs.eza]; + }; +} diff --git a/modules/common/fonts.nix b/modules/common/fonts.nix index 1e204e5..6bd3e71 100644 --- a/modules/common/fonts.nix +++ b/modules/common/fonts.nix @@ -28,8 +28,6 @@ with lib; { source-han-sans source-han-serif noto-fonts - noto-fonts-emoji - twitter-color-emoji font-awesome ]; }; diff --git a/modules/common/profiles/default.nix b/modules/common/profiles/default.nix index ad5e841..2b24752 100644 --- a/modules/common/profiles/default.nix +++ b/modules/common/profiles/default.nix @@ -73,6 +73,8 @@ in { ]; nixfiles.modules = { + bat.enable = true; + eza.enable = true; htop.enable = true; tmux.enable = true; vim.enable = true; diff --git a/modules/common/profiles/dev/default.nix b/modules/common/profiles/dev/default.nix index 822778f..2d0c0f6 100644 --- a/modules/common/profiles/dev/default.nix +++ b/modules/common/profiles/dev/default.nix @@ -17,7 +17,6 @@ in { config = mkIf cfg.enable { nixfiles.modules = { - common.nix.allowedUnfreePackages = ["terraform"]; bat.enable = true; curl.enable = true; direnv.enable = true; @@ -90,8 +89,6 @@ in { sops httpie logcli - terraform - opentofu ]; }; }; |