refactor(wpcarro): Define common.shell-utils

DRYing up some of my configuration.

Change-Id: I137692789426efc6a6c6880029e605813674fdbe
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4592
Reviewed-by: wpcarro <wpcarro@gmail.com>
Autosubmit: wpcarro <wpcarro@gmail.com>
Tested-by: BuildkiteCI
This commit is contained in:
William Carroll 2021-12-24 18:44:36 -05:00 committed by clbot
parent 9e55784265
commit c154e6689d
4 changed files with 57 additions and 60 deletions

27
users/wpcarro/common.nix Normal file
View file

@ -0,0 +1,27 @@
{ pkgs, ... }:
{
# Command-line tools I commonly used and want available on most (or all) of my
# machines.
shell-utils = with pkgs; [
bat
dig
direnv
diskus
emacs
exa
fd
fzf
git
jq
mkpasswd
nmap
python3
ripgrep
tldr
tokei
tree
vim
xclip
];
}

View file

@ -5,33 +5,20 @@
let let
inherit (builtins) path; inherit (builtins) path;
inherit (depot.third_party.nixpkgs) emacsPackagesGen emacs27; inherit (depot.third_party.nixpkgs) emacsPackagesGen emacs27;
inherit (depot.users) wpcarro;
inherit (pkgs) writeShellScript writeShellScriptBin; inherit (pkgs) writeShellScript writeShellScriptBin;
inherit (pkgs.lib.strings) concatStringsSep makeBinPath; inherit (pkgs.lib.strings) concatStringsSep makeBinPath;
emacsBinPath = makeBinPath (with pkgs; [ emacsBinPath = makeBinPath (
bat wpcarro.common.shell-utils ++
clipmenu (with pkgs; [
direnv clipmenu
diskus ispell
exa nix
fd pass
fzf scrot
gitAndTools.hub xorg.xset
google-cloud-sdk ]));
ispell
jq
kubectl
nix
nmap
pass
pup
ripgrep
scrot
tldr
tokei
xorg.xset
xsv
]);
emacsWithPackages = (emacsPackagesGen emacs27).emacsWithPackages; emacsWithPackages = (emacsPackagesGen emacs27).emacsWithPackages;

View file

@ -2,7 +2,7 @@
{ ... }: { ... }:
let let
inherit (depot.users.wpcarro) keys; inherit (depot.users) wpcarro;
in { in {
imports = [ imports = [
"${depot.path}/ops/modules/quassel.nix" "${depot.path}/ops/modules/quassel.nix"
@ -29,7 +29,7 @@ in {
wpcarro = { wpcarro = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" "quassel" ]; extraGroups = [ "wheel" "quassel" ];
openssh.authorizedKeys.keys = keys.all; openssh.authorizedKeys.keys = wpcarro.keys.all;
shell = pkgs.fish; shell = pkgs.fish;
}; };
}; };
@ -57,16 +57,7 @@ in {
''; '';
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = wpcarro.common.shell-utils;
dig
fd
fzf
mkpasswd
ripgrep
tldr
tree
vim
];
services = { services = {
depot.automatic-gc = { depot.automatic-gc = {
@ -123,12 +114,12 @@ in {
"wpcarro.dev" = { "wpcarro.dev" = {
addSSL = true; addSSL = true;
enableACME = true; enableACME = true;
root = depot.users.wpcarro.website; root = wpcarro.website;
}; };
"blog.wpcarro.dev" = { "blog.wpcarro.dev" = {
addSSL = true; addSSL = true;
enableACME = true; enableACME = true;
root = depot.users.wpcarro.website.blog; root = wpcarro.website.blog;
}; };
}; };
}; };

View file

@ -2,7 +2,8 @@
{ ... }: { ... }:
let let
wpcarrosEmacs = depot.users.wpcarro.emacs.nixos; inherit (depot.users) wpcarro;
wpcarrosEmacs = wpcarro.emacs.nixos;
quasselClient = pkgs.quassel.override { quasselClient = pkgs.quassel.override {
client = true; client = true;
@ -116,27 +117,18 @@ in {
VISUAL = "emacsclient"; VISUAL = "emacsclient";
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages =
alacritty wpcarro.common.shell-utils ++
dig (with pkgs; [
direnv alacritty
emacs firefox
fd pavucontrol
firefox quasselClient
fzf tdesktop
git weechat
pavucontrol wpcarrosEmacs
python3 xsecurelock
quasselClient ]);
ripgrep
tdesktop
tree
vim
weechat
wpcarrosEmacs
xclip
xsecurelock
];
system.stateVersion = "21.11"; system.stateVersion = "21.11";
} }