From 8207b0e249513feffd163d4228de685530fc665b Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Fri, 13 Oct 2023 20:39:39 +0300 Subject: 2023-10-13 --- modules/common/common/home-manager.nix | 4 ++-- modules/common/emacs/default.nix | 19 ++++++------------- modules/common/emacs/doom/config.el | 3 ++- modules/common/profiles/dev/editorconfig.ini | 4 ++++ modules/common/vscode.nix | 2 +- modules/darwin/homebrew.nix | 2 +- modules/darwin/profiles/headful.nix | 2 +- modules/darwin/vim/default.nix | 21 +++++++++++++-------- modules/nixos/common/security.nix | 4 ++-- modules/nixos/games/steam-run.nix | 4 +++- 10 files changed, 35 insertions(+), 30 deletions(-) (limited to 'modules') diff --git a/modules/common/common/home-manager.nix b/modules/common/common/home-manager.nix index 44b0eaa..97d7286 100644 --- a/modules/common/common/home-manager.nix +++ b/modules/common/common/home-manager.nix @@ -11,8 +11,8 @@ with lib; { hm = { news.display = "silent"; - # NOTE Inheriting directly from `system.stateVersion` does not work on MacOS for - # some reason. + # NOTE Inheriting directly from `system.stateVersion` does not work with + # nix-darwin for some reason. home.stateVersion = with builtins; head (split "\n" (readFile "${inputs.nixpkgs}/.version")); }; diff --git a/modules/common/emacs/default.nix b/modules/common/emacs/default.nix index a21b5ab..dfc657c 100644 --- a/modules/common/emacs/default.nix +++ b/modules/common/emacs/default.nix @@ -88,6 +88,11 @@ in { gore # :lang go gotools # :lang go graphviz # :lang (org +roam2) :lang plantuml + haskellPackages.cabal-fmt # :lang haskell :editor format + haskellPackages.cabal-install # :lang haskell + haskellPackages.haskell-language-server # :lang (haskell +lsp) + haskellPackages.hoogle # :lang haskell + haskellPackages.ormolu # :lang haskell :editor format html-tidy # :lang web jre # :lang plantuml libtool # :term vterm @@ -124,19 +129,7 @@ in { 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. diff --git a/modules/common/emacs/doom/config.el b/modules/common/emacs/doom/config.el index 015954b..0000679 100644 --- a/modules/common/emacs/doom/config.el +++ b/modules/common/emacs/doom/config.el @@ -70,7 +70,8 @@ ;;; Elisp ;; -(pushnew! flycheck-disabled-checkers 'emacs-lisp-checkdoc) +(after! flycheck + (pushnew! flycheck-disabled-checkers 'emacs-lisp-checkdoc)) ;; ;;; Haskell diff --git a/modules/common/profiles/dev/editorconfig.ini b/modules/common/profiles/dev/editorconfig.ini index 17b0317..098229f 100644 --- a/modules/common/profiles/dev/editorconfig.ini +++ b/modules/common/profiles/dev/editorconfig.ini @@ -62,6 +62,10 @@ max_line_length = 72 indent_size = 4 indent_style = tab +[*.{tf,hcl}] +indent_size = 2 +indent_style = space + [configure.ac] indent_size = 4 indent_style = tab diff --git a/modules/common/vscode.nix b/modules/common/vscode.nix index ab55acc..3ae9800 100644 --- a/modules/common/vscode.nix +++ b/modules/common/vscode.nix @@ -168,7 +168,7 @@ in { terraform = { languageServer.path = "${pkgs.terraform-ls}/bin/terraform-ls"; - languageServer.terraform.path = "${pkgs.terraform}/bin/terraform"; + languageServer.terraform.path = "${pkgs.opentofu}/bin/tofu"; }; haskell = { diff --git a/modules/darwin/homebrew.nix b/modules/darwin/homebrew.nix index 2667828..643787a 100644 --- a/modules/darwin/homebrew.nix +++ b/modules/darwin/homebrew.nix @@ -23,8 +23,8 @@ in { enable = true; onActivation = { autoUpdate = true; - cleanup = "zap"; upgrade = true; + cleanup = "zap"; }; }; }; diff --git a/modules/darwin/profiles/headful.nix b/modules/darwin/profiles/headful.nix index c50c657..01b1951 100644 --- a/modules/darwin/profiles/headful.nix +++ b/modules/darwin/profiles/headful.nix @@ -19,9 +19,9 @@ in { ]; homebrew.casks = [ - {name = "chromium";} {name = "firefox";} {name = "iterm2";} + {name = "macfuse";} {name = "telegram-desktop";} ]; }; diff --git a/modules/darwin/vim/default.nix b/modules/darwin/vim/default.nix index 519f120..e0a6898 100644 --- a/modules/darwin/vim/default.nix +++ b/modules/darwin/vim/default.nix @@ -9,14 +9,19 @@ with lib; let in { config = mkIf cfg.enable { programs.vim.package = - (pkgs.macvim.overrideAttrs (_: final: { - # TODO https://github.com/NixOS/nixpkgs/pull/239842 - configureFlags = - final.configureFlags - ++ [ - "--disable-perlinterp" - "--disable-rubyinterp" - ]; + (pkgs.macvim.overrideAttrs (_: _: { + # Too much of a hassle to selectively override this. Let's just + # explicitly override everything. + configureFlags = [ + "--disable-luainterp" + "--disable-python3interp" + "--disable-sparkle" + "--enable-gui=macvim" + "--with-compiledby=Nix" + "--with-features=huge" + "--with-tlib=ncurses" + "--without-local-dir" + ]; })) .configure (with cfg; { customRC = rc; diff --git a/modules/nixos/common/security.nix b/modules/nixos/common/security.nix index 2272e12..c635cdc 100644 --- a/modules/nixos/common/security.nix +++ b/modules/nixos/common/security.nix @@ -1,5 +1,4 @@ -{lib, ...}: -with lib; { +_: { security = { sudo = { enable = true; @@ -26,6 +25,7 @@ with lib; { ''; }; + # Pretty much used only for PipeWire. rtkit.enable = true; }; } diff --git a/modules/nixos/games/steam-run.nix b/modules/nixos/games/steam-run.nix index 4540e3f..2643c95 100644 --- a/modules/nixos/games/steam-run.nix +++ b/modules/nixos/games/steam-run.nix @@ -11,6 +11,7 @@ in { enable = mkEnableOption "native Steam runtime"; quirks = { + blackIsleStudios = mkEnableOption "fixes for games from Black Isle Studios"; cryptOfTheNecrodancer = mkEnableOption ''fixes for "Crypt of the NecroDancer" issues''; mountAndBladeWarband = mkEnableOption ''fixes for "Mount & Blade: Warband" issues''; }; @@ -30,7 +31,8 @@ in { (steam.override { extraLibraries = _: with cfg.quirks; - optionals cryptOfTheNecrodancer [ + optional blackIsleStudios openssl_1_0_0 + ++ optionals cryptOfTheNecrodancer [ (import (builtins.fetchTarball { url = "https://github.com/NixOS/nixpkgs/archive/d1c3fea7ecbed758168787fe4e4a3157e52bc808.tar.gz"; sha256 = "0ykm15a690v8lcqf2j899za3j6hak1rm3xixdxsx33nz7n3swsyy"; -- cgit v1.2.3