small command stuff, cleaning up tools not used
This commit is contained in:
		
							parent
							
								
									49d9907b32
								
							
						
					
					
						commit
						9fd291eed5
					
				|  | @ -2,198 +2,200 @@ | ||||||
| let inherit (lib) fileContents; | let inherit (lib) fileContents; | ||||||
| in | in | ||||||
| { | { | ||||||
| 	imports = [ ../cachix ]; |   imports = [ ../cachix ]; | ||||||
| 
 | 
 | ||||||
| 	nix.systemFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; |   nix.systemFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; | ||||||
| 
 | 
 | ||||||
| 	environment = { |   environment = { | ||||||
| 		systemPackages = with pkgs; [ |     systemPackages = with pkgs; [ | ||||||
| 			binutils |       binutils | ||||||
| 			coreutils |       coreutils | ||||||
| 			direnv |       direnv | ||||||
| 			dnsutils |       dnsutils | ||||||
| 			dosfstools |       dosfstools | ||||||
| 			git |       git | ||||||
| 			bottom |       bottom | ||||||
| 			gptfdisk |       gptfdisk | ||||||
| 			iputils |       iputils | ||||||
| 			jq |       jq | ||||||
| 			manix |       manix | ||||||
| 			tree |       delta | ||||||
| 			delta |       moreutils | ||||||
| 			moreutils |       nix-index | ||||||
| 			nix-index |       cached-nix-shell | ||||||
| 			cached-nix-shell |       nmap | ||||||
| 			nmap |       ripgrep | ||||||
| 			ripgrep |       skim | ||||||
| 			skim |       tealdeer | ||||||
| 			tealdeer |       usbutils | ||||||
| 			usbutils |       utillinux | ||||||
| 			utillinux |       whois | ||||||
| 			whois |       iftop | ||||||
| 			htop |       wget | ||||||
| 			iftop |       curl | ||||||
| 			wget |       exa | ||||||
| 			curl |       bat | ||||||
| 			exa |       fd | ||||||
| 			bat |       ag | ||||||
| 			fd |       tcpdump | ||||||
| 			ag |       mtr | ||||||
| 			tcpdump |       file | ||||||
| 			mtr |       lsof | ||||||
| 			file |       atool | ||||||
| 			lsof |       inotify-tools | ||||||
| 			atool |       strace | ||||||
| 			inotify-tools |       zip | ||||||
| 			strace |       unzip | ||||||
| 			zip |       rsync | ||||||
| 			unzip |       tmux | ||||||
| 			rsync |       pwgen | ||||||
| 			tmux |       glow | ||||||
| 			pwgen |       gitAndTools.gitFull | ||||||
| 			glow |       pinentry_gnome | ||||||
| 			gitAndTools.gitFull |       pass | ||||||
| 			pinentry_gnome |       less | ||||||
| 			pass |       gdb | ||||||
| 			less |       xxd | ||||||
| 			gdb |       kitty | ||||||
| 			xxd |       taskwarrior | ||||||
| 			kitty |       gnupg | ||||||
| 			taskwarrior |       syncthing | ||||||
| 			gnupg |       dijo | ||||||
| 			syncthing |       #kdeconnect | ||||||
| 			dijo |       #ssb-patchwork | ||||||
| 			#kdeconnect |       libreoffice | ||||||
| 			#ssb-patchwork |       fontconfig | ||||||
| 			libreoffice |       pandoc | ||||||
| 			fontconfig |     ]; | ||||||
| 			pandoc |  | ||||||
| 		]; |  | ||||||
| 
 | 
 | ||||||
| 		shellInit = '' |     shellInit = '' | ||||||
| 			export STARSHIP_CONFIG=${ |       export STARSHIP_CONFIG=${ | ||||||
| 				pkgs.writeText "starship.toml" |         pkgs.writeText "starship.toml" | ||||||
| 				(fileContents ./starship.toml) |         (fileContents ./starship.toml) | ||||||
| 			} |       } | ||||||
| 		''; |     ''; | ||||||
| 
 | 
 | ||||||
| 		shellAliases = |     shellAliases = | ||||||
| 			let ifSudo = lib.mkIf config.security.sudo.enable; |       let ifSudo = lib.mkIf config.security.sudo.enable; | ||||||
| 			in |       in | ||||||
| 			{ |       { | ||||||
| 				# quick cd |         # quick cd | ||||||
| 				".." = "cd .."; |         ".." = "cd .."; | ||||||
| 				"..." = "cd ../.."; |         "..." = "cd ../.."; | ||||||
| 				"...." = "cd ../../.."; |         "...." = "cd ../../.."; | ||||||
| 				"....." = "cd ../../../.."; |         "....." = "cd ../../../.."; | ||||||
| 
 | 
 | ||||||
| 				# modern cli tools  |         # modern cli tools  | ||||||
| 				ls = "exa"; |         ls = "exa"; | ||||||
| 				l = "ls"; |         l = "ls"; | ||||||
| 				tree = "ls --tree"; |         tree = "ls --tree"; | ||||||
| 				cat = "bat"; |         cat = "bat"; | ||||||
| 				unzip = "aunpack"; |         unzip = "aunpack"; | ||||||
| 				copy = "xclip -selection clipboard"; |         copy = "xclip -selection clipboard"; | ||||||
| 				paste = "xclip -selection clipboard -o"; |         paste = "xclip -selection clipboard -o"; | ||||||
| 
 | 
 | ||||||
| 				# task warrior |         # task warrior | ||||||
| 				t = "task"; |         t = "task"; | ||||||
|  |         ts = "task sync"; | ||||||
| 
 | 
 | ||||||
| 				# git |         # git | ||||||
| 				g = "git"; |         g = "git"; | ||||||
| 
 | 
 | ||||||
| 				# grep |         # grep | ||||||
| 				grep = "rg"; |         grep = "rg"; | ||||||
| 				gi = "grep -i"; |         gi = "grep -i"; | ||||||
| 
 | 
 | ||||||
| 				# internet ip |         # internet ip | ||||||
| 				myip = "dig +short myip.opendns.com @208.67.222.222 2>&1"; |         myip = "dig +short myip.opendns.com @208.67.222.222 2>&1"; | ||||||
| 
 | 
 | ||||||
| 				# nix |         # nix | ||||||
| 				n = "nix"; |         n = "nix"; | ||||||
| 				np = "n profile"; |         np = "n profile"; | ||||||
| 				ni = "np install"; |         ni = "np install"; | ||||||
| 				nr = "np remove"; |         nr = "np remove"; | ||||||
| 				ns = "n search --no-update-lock-file"; |         ns = "n search --no-update-lock-file"; | ||||||
| 				nf = "n flake"; |         nf = "n flake"; | ||||||
| 				nepl = "n repl '<nixpkgs>'"; |         nepl = "n repl '<nixpkgs>'"; | ||||||
| 				srch = "ns nixos"; |         srch = "ns nixos"; | ||||||
| 				orch = "ns override"; |         orch = "ns override"; | ||||||
| 				nrb = ifSudo "sudo nixos-rebuild switch --flake '/etc/nixos/#curve'"; |         nrb = ifSudo "sudo nixos-rebuild switch --flake '/etc/nixos/#curve'"; | ||||||
| 				nrt = ifSudo "sudo nixos-rebuild test --flake '/etc/nixos/#curve'"; |         nrt = ifSudo "sudo nixos-rebuild test --flake '/etc/nixos/#curve'"; | ||||||
| 				nedit = "cd /etc/nixos; vim"; |         nedit = "cd /etc/nixos; vim"; | ||||||
| 				ncd = "cd  /etc/nixos"; |         ncd = "cd  /etc/nixos"; | ||||||
| 				mn = '' |         mn = '' | ||||||
| 					manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="manix '{}'" | xargs manix |           manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="manix '{}'" | xargs manix | ||||||
| 				''; |         ''; | ||||||
| 
 | 
 | ||||||
| 				# fix nixos-option |         # fix nixos-option | ||||||
| 				nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat"; |         nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat"; | ||||||
| 
 | 
 | ||||||
| 				# sudo |         # sudo | ||||||
| 				s = ifSudo "sudo -E "; |         s = ifSudo "sudo -E "; | ||||||
| 				pls = ifSudo "s"; |         pls = ifSudo "s"; | ||||||
| 				si = ifSudo "sudo -i"; |         si = ifSudo "sudo -i"; | ||||||
| 				se = ifSudo "sudoedit"; |         se = ifSudo "sudoedit"; | ||||||
| 
 | 
 | ||||||
| 				# top |         # top | ||||||
| 				top = "btm"; |         top = "btm"; | ||||||
| 
 | 
 | ||||||
| 				# systemd |         # systemd | ||||||
| 				ctl = "systemctl"; |         ctl = "systemctl"; | ||||||
| 				stl = ifSudo "s systemctl"; |         stl = ifSudo "s systemctl"; | ||||||
| 				utl = "systemctl --user"; |         utl = "systemctl --user"; | ||||||
| 				ut = "systemctl --user start"; |         ut = "systemctl --user start"; | ||||||
| 				un = "systemctl --user stop"; |         un = "systemctl --user stop"; | ||||||
| 				up = ifSudo "s systemctl start"; |         up = ifSudo "s systemctl start"; | ||||||
| 				dn = ifSudo "s systemctl stop"; |         dn = ifSudo "s systemctl stop"; | ||||||
| 				jtl = "journalctl"; |         jtl = "journalctl"; | ||||||
| 
 | 
 | ||||||
| 			}; |         # quick ssh | ||||||
| 	}; |         sm = "ssh mossnet.lan"; | ||||||
|  |         ss = "ssh sealight.xyz"; | ||||||
|  |       }; | ||||||
|  |   }; | ||||||
| 
 | 
 | ||||||
| 	fonts = { |   fonts = { | ||||||
| 		fonts = with pkgs; [ powerline-fonts dejavu_fonts ]; |     fonts = with pkgs; [ powerline-fonts dejavu_fonts ]; | ||||||
| 		fontconfig.defaultFonts = { |     fontconfig.defaultFonts = { | ||||||
| 			monospace = [ "DejaVu Sans Mono for Powerline" ]; |       monospace = [ "DejaVu Sans Mono for Powerline" ]; | ||||||
| 			sansSerif = [ "DejaVu Sans" ]; |       sansSerif = [ "DejaVu Sans" ]; | ||||||
| 		}; |     }; | ||||||
| 	}; |   }; | ||||||
| 
 | 
 | ||||||
| 	nix = { |   nix = { | ||||||
| 		autoOptimiseStore = true; |     autoOptimiseStore = true; | ||||||
| 		gc.automatic = true; |     gc.automatic = true; | ||||||
| 		optimise.automatic = true; |     optimise.automatic = true; | ||||||
| 		useSandbox = true; |     useSandbox = true; | ||||||
| 		allowedUsers = [ "@wheel" ]; |     allowedUsers = [ "@wheel" ]; | ||||||
| 		trustedUsers = [ "root" "@wheel" ]; |     trustedUsers = [ "root" "@wheel" ]; | ||||||
| 		extraOptions = '' |     extraOptions = '' | ||||||
| 			min-free = 536870912 |       min-free = 536870912 | ||||||
| 			keep-outputs = true |       keep-outputs = true | ||||||
| 			keep-derivations = true |       keep-derivations = true | ||||||
| 			fallback = true |       fallback = true | ||||||
| 		''; |     ''; | ||||||
| 	}; |   }; | ||||||
| 
 | 
 | ||||||
| 	programs.bash = { |   programs.bash = { | ||||||
| 		promptInit = '' |     promptInit = '' | ||||||
| 			eval "$(${pkgs.starship}/bin/starship init bash)" |       eval "$(${pkgs.starship}/bin/starship init bash)" | ||||||
| 		''; |     ''; | ||||||
| 		interactiveShellInit = '' |     interactiveShellInit = '' | ||||||
| 			eval "$(${pkgs.direnv}/bin/direnv hook bash)" |       eval "$(${pkgs.direnv}/bin/direnv hook bash)" | ||||||
| 		''; |     ''; | ||||||
| 		enableCompletion = true; |     enableCompletion = true; | ||||||
| 	}; |   }; | ||||||
| 
 | 
 | ||||||
| 	# For rage encryption, all hosts need a ssh key pair |   # For rage encryption, all hosts need a ssh key pair | ||||||
| 	services.openssh = { |   services.openssh = { | ||||||
| 		enable = true; |     enable = true; | ||||||
| 		openFirewall = lib.mkDefault false; |     openFirewall = lib.mkDefault false; | ||||||
| 	}; |   }; | ||||||
| 
 | 
 | ||||||
| 	programs.gnupg.agent.enable = true; |   programs.gnupg.agent.enable = true; | ||||||
| 	#programs.gnupg.agent.pinentryFlavor = "curses"; |   #programs.gnupg.agent.pinentryFlavor = "curses"; | ||||||
| 	programs.gnupg.agent.pinentryFlavor = "gnome3"; |   programs.gnupg.agent.pinentryFlavor = "gnome3"; | ||||||
| 
 | 
 | ||||||
| 	services.earlyoom.enable = true; |   services.earlyoom.enable = true; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue