2024-04-08 20:50:31 -05:00
|
|
|
{ pkgs, ... }:
|
2024-02-21 01:45:26 -06:00
|
|
|
{
|
|
|
|
|
2024-02-23 13:42:07 -06:00
|
|
|
imports = [ ../cachix.nix ];
|
2024-02-21 01:45:26 -06:00
|
|
|
# Bootloader.
|
|
|
|
boot = {
|
|
|
|
loader = {
|
|
|
|
systemd-boot.enable = true;
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
};
|
|
|
|
initrd = {
|
|
|
|
supportedFilesystems = [ "nfs" ];
|
|
|
|
kernelModules = [ "nfs" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
fileSystems."/mnt/borg" = {
|
|
|
|
device = "10.1.1.13:/eru/borg";
|
|
|
|
fsType = "nfs";
|
|
|
|
options = [ "x-systemd.automount" "noauto" ];
|
|
|
|
};
|
|
|
|
|
2024-04-04 14:17:51 -05:00
|
|
|
nix.settings = {
|
|
|
|
experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
trusted-users = [ "root" "jahanson" ];
|
|
|
|
extra-substituters = "https://cache.garnix.io";
|
|
|
|
extra-trusted-public-keys = "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=";
|
|
|
|
};
|
2024-02-21 01:45:26 -06:00
|
|
|
|
|
|
|
# Enable fish
|
|
|
|
programs.fish.enable = true;
|
|
|
|
|
|
|
|
# root ssh keys
|
|
|
|
users.users.root.openssh.authorizedKeys.keys = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBsUe5YF5z8vGcEYtQX7AAiw2rJygGf2l7xxr8nZZa7w"
|
|
|
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBH3VVFenoJfnu+IFUlD79uxl7L8SFoRup33J2HGny4WEdRgGR41s0MpFKDBmxXZHy4O9Nh8NMMnpy5VhUefnIKI="
|
|
|
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPHFQ3hDjjrKsecn3jmSWYlRXy4IJCrepgU1HaIV5VcmB3mUFmIZ/pCZnPmIG/Gbuqf1PP2FQDmHMX5t0hTYG9A="
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIETR70eQJiXaJuB+qpI1z+jFOPbEZoQNRcq4VXkojWfU"
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAanHn3AWxWfHv51wgDmJwhQrJgsGd+LomJJZ5kXFTP3 jahanson@durincore"
|
2024-02-23 12:02:42 -06:00
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIATyScd8ZRhV7uZmrQNSAbRTs9N/Dbx+Y8tGEDny30sA jahanson@Anduril"
|
2024-02-21 01:45:26 -06:00
|
|
|
];
|
|
|
|
|
|
|
|
# Set up users
|
|
|
|
users.users.jahanson = {
|
|
|
|
isNormalUser = true;
|
|
|
|
description = "Joseph Hanson";
|
|
|
|
extraGroups = [ "networkmanager" "wheel" ];
|
|
|
|
shell = pkgs.fish;
|
|
|
|
openssh.authorizedKeys.keys = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBsUe5YF5z8vGcEYtQX7AAiw2rJygGf2l7xxr8nZZa7w"
|
|
|
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBH3VVFenoJfnu+IFUlD79uxl7L8SFoRup33J2HGny4WEdRgGR41s0MpFKDBmxXZHy4O9Nh8NMMnpy5VhUefnIKI="
|
|
|
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPHFQ3hDjjrKsecn3jmSWYlRXy4IJCrepgU1HaIV5VcmB3mUFmIZ/pCZnPmIG/Gbuqf1PP2FQDmHMX5t0hTYG9A="
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIETR70eQJiXaJuB+qpI1z+jFOPbEZoQNRcq4VXkojWfU"
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAanHn3AWxWfHv51wgDmJwhQrJgsGd+LomJJZ5kXFTP3 jahanson@durincore"
|
2024-02-23 12:02:42 -06:00
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIATyScd8ZRhV7uZmrQNSAbRTs9N/Dbx+Y8tGEDny30sA jahanson@Anduril"
|
2024-02-21 01:45:26 -06:00
|
|
|
];
|
2024-02-23 12:02:42 -06:00
|
|
|
};
|
|
|
|
|
2024-02-21 01:45:26 -06:00
|
|
|
# Default editor
|
|
|
|
environment.variables.EDITOR = "vim";
|
|
|
|
# Time zone.
|
|
|
|
time.timeZone = "America/Chicago";
|
|
|
|
|
|
|
|
# Select internationalisation properties.
|
|
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
i18n.extraLocaleSettings = {
|
|
|
|
LC_ADDRESS = "en_US.UTF-8";
|
|
|
|
LC_IDENTIFICATION = "en_US.UTF-8";
|
|
|
|
LC_MEASUREMENT = "en_US.UTF-8";
|
|
|
|
LC_MONETARY = "en_US.UTF-8";
|
|
|
|
LC_NAME = "en_US.UTF-8";
|
|
|
|
LC_NUMERIC = "en_US.UTF-8";
|
|
|
|
LC_PAPER = "en_US.UTF-8";
|
|
|
|
LC_TELEPHONE = "en_US.UTF-8";
|
|
|
|
LC_TIME = "en_US.UTF-8";
|
|
|
|
};
|
|
|
|
|
|
|
|
# Allow unfree packages
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
|
|
|
git
|
|
|
|
wget
|
|
|
|
curl
|
|
|
|
vim
|
|
|
|
lazygit
|
|
|
|
tailscale
|
|
|
|
python3
|
|
|
|
ansible
|
|
|
|
smartmontools
|
|
|
|
nfs-utils
|
2024-03-05 18:30:38 -06:00
|
|
|
borgbackup
|
|
|
|
borgmatic
|
2024-02-21 01:45:26 -06:00
|
|
|
|
2024-03-10 22:24:59 -05:00
|
|
|
#utils
|
|
|
|
ripgrep # recursively searches directories for a regex pattern
|
|
|
|
jq # A lightweight and flexible command-line JSON processor
|
|
|
|
yq-go # yaml processer https://github.com/mikefarah/yq
|
|
|
|
fzf # A command-line fuzzy finder
|
|
|
|
age # sops-age encryption
|
|
|
|
sops
|
|
|
|
lsd
|
|
|
|
|
|
|
|
#misc
|
|
|
|
cowsay
|
|
|
|
file
|
|
|
|
which
|
|
|
|
tree
|
|
|
|
gnused
|
|
|
|
gnutar
|
|
|
|
gawk
|
|
|
|
zstd
|
|
|
|
gnupg
|
|
|
|
fastfetch
|
|
|
|
atuin
|
|
|
|
go-task
|
|
|
|
|
|
|
|
# archives
|
|
|
|
zip
|
|
|
|
xz
|
|
|
|
unzip
|
|
|
|
p7zip
|
|
|
|
|
|
|
|
# terminal file managers
|
|
|
|
nnn
|
|
|
|
ranger
|
|
|
|
yazi
|
|
|
|
|
|
|
|
# networking tools
|
|
|
|
iperf3
|
|
|
|
dnsutils # `dig` + `nslookup`
|
|
|
|
ldns # replacement of `dig`, it provide the command `drill`
|
|
|
|
aria2 # A lightweight multi-protocol & multi-source command-line download utility
|
|
|
|
socat # replacement of openbsd-netcat
|
|
|
|
nmap # A utility for network discovery and security auditing
|
|
|
|
ipcalc # it is a calculator for the IPv4/v6 addresses
|
|
|
|
|
|
|
|
# system tools
|
|
|
|
sysstat
|
|
|
|
lm_sensors # for `sensors` command
|
|
|
|
ethtool
|
|
|
|
pciutils # lspci
|
|
|
|
usbutils # lsusb
|
|
|
|
|
|
|
|
# system call monitoring
|
|
|
|
strace # system call monitoring
|
|
|
|
ltrace # library call monitoring
|
|
|
|
lsof # list open files
|
|
|
|
|
|
|
|
btop # replacement of htop/nmon
|
|
|
|
iotop # io monitoring
|
|
|
|
iftop # network monitoring
|
|
|
|
|
|
|
|
# utils
|
|
|
|
direnv # shell environment management
|
|
|
|
pre-commit # Pre-commit tasks for git
|
|
|
|
minio-client # S3 management
|
|
|
|
shellcheck
|
|
|
|
envsubst
|
|
|
|
|
2024-04-08 19:41:26 -05:00
|
|
|
# nix tools
|
|
|
|
nvd
|
|
|
|
|
2024-03-10 22:24:59 -05:00
|
|
|
];
|
|
|
|
# my traceroute
|
2024-02-21 01:45:26 -06:00
|
|
|
programs.mtr.enable = true;
|
|
|
|
|
2024-03-10 22:24:59 -05:00
|
|
|
# starship - an customizable prompt for any shell
|
|
|
|
programs.starship = {
|
|
|
|
enable = true;
|
|
|
|
# custom settings
|
|
|
|
settings = {
|
|
|
|
add_newline = false;
|
|
|
|
aws.disabled = true;
|
|
|
|
gcloud.disabled = true;
|
|
|
|
line_break.disabled = true;
|
|
|
|
username = {
|
|
|
|
disabled = false;
|
|
|
|
show_always = true;
|
|
|
|
format = "[$user]($style)@";
|
|
|
|
};
|
|
|
|
hostname ={
|
|
|
|
disabled = false;
|
|
|
|
ssh_only = false;
|
|
|
|
format = "[$hostname]($style) ";
|
|
|
|
ssh_symbol = "";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-02-21 01:45:26 -06:00
|
|
|
# Enable/Start Tailscale service
|
|
|
|
services.tailscale.enable = true;
|
|
|
|
|
2024-02-23 12:02:42 -06:00
|
|
|
}
|