From 62e2519639faa250f43f9e80e69906a59d07a44e Mon Sep 17 00:00:00 2001 From: Grisha Shipunov Date: Sat, 11 Jan 2025 03:55:19 +0100 Subject: delete legacy stuff and reformat --- modules/basic-tools/default.nix | 76 +++++++++++++++++++++--------------- modules/basic-tools/fzf.nix | 26 ++++++++---- modules/basic-tools/multiplexers.nix | 3 +- modules/basic-tools/nix-ld.nix | 10 ++--- modules/basic-tools/nix.nix | 18 ++++++--- 5 files changed, 82 insertions(+), 51 deletions(-) (limited to 'modules/basic-tools') diff --git a/modules/basic-tools/default.nix b/modules/basic-tools/default.nix index f7ef3c3..1d4f2a4 100644 --- a/modules/basic-tools/default.nix +++ b/modules/basic-tools/default.nix @@ -8,37 +8,48 @@ ./nix-ld.nix ]; - environment.systemPackages = with pkgs; [ - bat - fd - file - gnupg - glow - htop - irssi - killall - neovim - ripgrep - tealdeer - traceroute - tcpdump - tree - (aspellWithDicts (ps: with ps; [ en en-science en-computers ru nl ])) - exfatprogs - nmap - bind - nnn - lf - man-pages - unzip - usbutils - pciutils - ouch - cryptsetup - sshfs - whois - mtr - ] ++ (if config.networking.hostName == "toaster" then [ gitFull ] else [ git ]); + environment.systemPackages = + with pkgs; + [ + bat + fd + file + gnupg + glow + htop + irssi + killall + neovim + ripgrep + tealdeer + traceroute + tcpdump + tree + (aspellWithDicts ( + ps: with ps; [ + en + en-science + en-computers + ru + nl + ] + )) + exfatprogs + nmap + bind + nnn + lf + man-pages + unzip + usbutils + pciutils + ouch + cryptsetup + sshfs + whois + mtr + ] + ++ (if config.networking.hostName == "toaster" then [ gitFull ] else [ git ]); environment.variables = let @@ -53,7 +64,8 @@ { PAGER = "less"; LESS = "-X -R -F"; - } // editorconf; + } + // editorconf; environment.shellAliases = { ls = "ls --color=auto"; diff --git a/modules/basic-tools/fzf.nix b/modules/basic-tools/fzf.nix index 6fc84fe..8ad1b92 100644 --- a/modules/basic-tools/fzf.nix +++ b/modules/basic-tools/fzf.nix @@ -1,4 +1,10 @@ -{ lib, config, pkgs, ... }: { +{ + lib, + config, + pkgs, + ... +}: +{ environment = { systemPackages = [ pkgs.fzf ]; @@ -8,11 +14,15 @@ }; }; # integrate fzf into shell, >23.05 only - programs = with lib; - if (toInt (elemAt (splitVersion config.system.nixos.release) 0) >= 23) then { - fzf = { - keybindings = true; - fuzzyCompletion = true; - }; - } else { }; + programs = + with lib; + if (toInt (elemAt (splitVersion config.system.nixos.release) 0) >= 23) then + { + fzf = { + keybindings = true; + fuzzyCompletion = true; + }; + } + else + { }; } diff --git a/modules/basic-tools/multiplexers.nix b/modules/basic-tools/multiplexers.nix index 55268ef..b744942 100644 --- a/modules/basic-tools/multiplexers.nix +++ b/modules/basic-tools/multiplexers.nix @@ -1,4 +1,5 @@ -{ pkgs, inputs, ... }: { +{ pkgs, inputs, ... }: +{ programs.tmux = { enable = true; keyMode = "vi"; diff --git a/modules/basic-tools/nix-ld.nix b/modules/basic-tools/nix-ld.nix index 2462721..d9abd55 100644 --- a/modules/basic-tools/nix-ld.nix +++ b/modules/basic-tools/nix-ld.nix @@ -1,10 +1,10 @@ { pkgs, lib, ... }: { - programs.nix-ld ={ - enable = true; - libraries = [ - pkgs.stdenv.cc.cc - ]; + programs.nix-ld = { + enable = true; + libraries = [ + pkgs.stdenv.cc.cc + ]; }; #environment.variables = { # NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [ diff --git a/modules/basic-tools/nix.nix b/modules/basic-tools/nix.nix index 9faa527..980ab76 100644 --- a/modules/basic-tools/nix.nix +++ b/modules/basic-tools/nix.nix @@ -1,9 +1,15 @@ -{ lib, pkgs, inputs, ... }: { +{ + lib, + pkgs, + inputs, + ... +}: +{ nix = { extraOptions = '' - experimental-features = nix-command flakes - narinfo-cache-negative-ttl = 0 + experimental-features = nix-command flakes + narinfo-cache-negative-ttl = 0 ''; }; @@ -12,8 +18,10 @@ # override default nix shell nixpkgs# behaviour to use current flake lock nix.registry = - let flakes = lib.filterAttrs (_name: value: value ? outputs) inputs.self.inputs; - in builtins.mapAttrs (_name: v: { flake = v; }) flakes; + let + flakes = lib.filterAttrs (_name: value: value ? outputs) inputs.self.inputs; + in + builtins.mapAttrs (_name: v: { flake = v; }) flakes; nix.nixPath = lib.mapAttrsToList (name: value: "${name}=${value.outPath}") inputs.self.inputs; -- cgit v1.3.1