Files
machine_setup/nix/configuration/roles/base/default.nix

75 lines
1.8 KiB
Nix
Raw Normal View History

{
config,
lib,
pkgs,
...
}:
let
patchScriptBin =
filename: contents:
((pkgs.writeScriptBin filename contents).overrideAttrs (old: {
buildCommand = "${old.buildCommand}\n patchShebangs $out";
}));
cleanup_temporary_files = (
patchScriptBin "cleanup_temporary_files" (builtins.readFile ./files/cleanup_temporary_files.bash)
);
2026-05-06 09:49:47 -04:00
decode_jwt = (patchScriptBin "decode_jwt" (builtins.readFile ./files/decode_jwt.bash));
2026-05-06 09:56:18 -04:00
git_find_merged_branches = (
patchScriptBin "git_find_merged_branches" (builtins.readFile ./files/git_find_merged_branches.bash)
);
2026-05-06 10:00:02 -04:00
git_fix_author = (patchScriptBin "git_fix_author" (builtins.readFile ./files/git_fix_author.bash));
2026-03-24 18:41:18 -04:00
alias_rga = pkgs.writeShellScriptBin "rga" ''
2025-11-15 19:27:47 -05:00
exec ${pkgs.ripgrep}/bin/rg -uuu "''${@}"
'';
in
{
imports = [ ];
options.me = {
base.enable = lib.mkOption {
type = lib.types.bool;
default = false;
example = true;
description = "Whether we want to install base.";
};
};
config = lib.mkIf config.me.base.enable {
environment.systemPackages = with pkgs; [
wget
mg
rsync
libinput
htop
tmux
file
usbutils # for lsusb
pciutils # for lspci
ripgrep
2025-11-15 19:27:47 -05:00
alias_rga
strace
# ltrace # Disabled because it uses more than 48GB of /tmp space during test phase.
trace-cmd # ftrace
tcpdump
git-crypt
gnumake
ncdu
nix-tree
libarchive # bsdtar
lsof
dmidecode # Read SMBIOS information.
ipcalc
gptfdisk # for cgdisk
nix-output-monitor # For better view into nixos-rebuild
2026-01-15 18:10:05 -05:00
# nix-serve-ng # Serve nix store over http
cleanup_temporary_files
2026-05-06 09:49:47 -04:00
decode_jwt
2025-11-24 20:29:35 -05:00
jq
2025-12-09 12:16:39 -05:00
inetutils # For whois
2026-05-06 10:00:02 -04:00
git_find_merged_branches
git_fix_author
];
};
}