mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-12-02 10:44:00 +01:00
refactor: trim unused virtualisation config and packages (#332)
This commit is contained in:
1 parent
1546e54bb2
commit
8f9fdda2bb
17 files changed
+71
-203
No files matched your search
+1
-1
@@ -56,7 +56,7 @@ modules/
|
||||
│ ├── power.nix # Power management
|
||||
│ ├── security.nix # Desktop security settings
|
||||
│ ├── ssh.nix # Desktop SSH configuration
|
||||
│ ├── virtualisation.nix # Virtualization support
|
||||
│ ├── containers.nix # Container engines (podman/docker)
|
||||
│ └── xdg.nix # XDG base directory settings
|
||||
└── server/ # Server-specific modules
|
||||
├── qemu-guest-hardware-configuration.nix
|
||||
|
||||
@@ -19,11 +19,6 @@
|
||||
git # used by nix flakes
|
||||
git-lfs # used by huggingface models
|
||||
|
||||
# system monitoring
|
||||
procs # a moreden ps
|
||||
# btop is provided per host: the GPU-aware `modules.btop` build on NixOS, or
|
||||
# Home Manager on macOS. Not listed here to avoid a second, plain copy.
|
||||
|
||||
# archives
|
||||
zip
|
||||
xz
|
||||
@@ -41,7 +36,6 @@
|
||||
|
||||
jq # A lightweight and flexible command-line JSON processor
|
||||
yq-go # yaml processor https://github.com/mikefarah/yq
|
||||
jc # converts the output of popular cli tools & file-types to JSON, YAML
|
||||
|
||||
# Interactively filter its input using fuzzy searching, not limit to filenames.
|
||||
fzf
|
||||
@@ -52,26 +46,19 @@
|
||||
(ripgrep.override { withPCRE2 = true; })
|
||||
|
||||
duf # Disk Usage/Free Utility - a better 'df' alternative
|
||||
dust # A more intuitive version of `du` in rust
|
||||
gdu # disk usage analyzer(replacement of `du`)
|
||||
ncdu # analyzer your disk usage Interactively, via TUI(replacement of `du`)
|
||||
gdu # disk usage analyzer, non-interactive (`-n`) & JSON (`-o`)
|
||||
|
||||
# networking tools
|
||||
mtr # A network diagnostic tool(traceroute)
|
||||
gping # ping, but with a graph(TUI)
|
||||
dnsutils # `dig` + `nslookup`
|
||||
ldns # replacement of `dig`, it provide the command `drill`
|
||||
doggo # DNS client for humans
|
||||
wget
|
||||
curl
|
||||
curlie # curl with httpie
|
||||
httpie
|
||||
xh # friendly, fast curl-like HTTP client (Rust)
|
||||
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
|
||||
iperf3 # network performance test
|
||||
hyperfine # command-line benchmarking tool
|
||||
tcpdump # network sniffer
|
||||
|
||||
# file transfer
|
||||
|
||||
@@ -5,22 +5,16 @@
|
||||
environment.systemPackages = with pkgs; [
|
||||
# system call monitoring
|
||||
strace # system call monitoring
|
||||
ltrace # library call monitoring
|
||||
lsof # list open files
|
||||
|
||||
# ebpf related tools
|
||||
# https://github.com/bpftrace/bpftrace
|
||||
bpftrace # powerful tracing tool
|
||||
bpftop # monitor BPF programs
|
||||
bpfmon # BPF based visual packet rate monitor
|
||||
|
||||
# system monitoring
|
||||
sysstat
|
||||
iotop-c
|
||||
iftop
|
||||
nmon
|
||||
sysbench
|
||||
systemctl-tui
|
||||
pv # pipe view
|
||||
|
||||
# system tools
|
||||
@@ -29,7 +23,6 @@
|
||||
ethtool
|
||||
pciutils # lspci
|
||||
usbutils # lsusb
|
||||
hdparm # for disk performance, command
|
||||
dmidecode # a tool that reads information about your system's hardware from the BIOS according to the SMBIOS/DMI standard
|
||||
parted
|
||||
smartmontools # smartctl -a /dev/nvme0n1
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
{ ... }:
|
||||
{
|
||||
###################################################################################
|
||||
#
|
||||
# Containers - Podman
|
||||
#
|
||||
###################################################################################
|
||||
|
||||
virtualisation = {
|
||||
podman = {
|
||||
enable = true;
|
||||
# Create a `docker` alias for podman, to use it as a drop-in replacement
|
||||
dockerCompat = true;
|
||||
# Required for containers under podman-compose to be able to talk to each other.
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
# Periodically prune Podman resources
|
||||
autoPrune = {
|
||||
enable = true;
|
||||
dates = "weekly";
|
||||
flags = [ "--all" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
# nur-ataraxiasjel,
|
||||
...
|
||||
}:
|
||||
{
|
||||
###################################################################################
|
||||
#
|
||||
# Virtualisation - Libvirt(QEMU/KVM) / Docker / LXD / WayDroid
|
||||
#
|
||||
###################################################################################
|
||||
|
||||
# Enable nested virtualization, required by security containers and nested vm.
|
||||
# This should be set per host in /hosts, not here.
|
||||
#
|
||||
## For AMD CPU, add "kvm-amd" to kernelModules.
|
||||
# boot.kernelModules = ["kvm-amd"];
|
||||
# boot.extraModprobeConfig = "options kvm_amd nested=1"; # for amd cpu
|
||||
#
|
||||
## For Intel CPU, add "kvm-intel" to kernelModules.
|
||||
# boot.kernelModules = ["kvm-intel"];
|
||||
# boot.extraModprobeConfig = "options kvm_intel nested=1"; # for intel cpu
|
||||
|
||||
boot.kernelModules = [ "vfio-pci" ];
|
||||
|
||||
services.flatpak.enable = true;
|
||||
|
||||
virtualisation = {
|
||||
docker.enable = false;
|
||||
podman = {
|
||||
enable = true;
|
||||
# Create a `docker` alias for podman, to use it as a drop-in replacement
|
||||
dockerCompat = true;
|
||||
# Required for containers under podman-compose to be able to talk to each other.
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
# Periodically prune Podman resources
|
||||
autoPrune = {
|
||||
enable = true;
|
||||
dates = "weekly";
|
||||
flags = [ "--all" ];
|
||||
};
|
||||
};
|
||||
|
||||
oci-containers = {
|
||||
backend = "podman";
|
||||
};
|
||||
|
||||
# Usage: https://wiki.nixos.org/wiki/Waydroid
|
||||
# waydroid.enable = true;
|
||||
|
||||
# libvirtd = {
|
||||
# enable = true;
|
||||
# # hanging this option to false may cause file permission issues for existing guests.
|
||||
# # To fix these, manually change ownership of affected files in /var/lib/libvirt/qemu to qemu-libvirtd.
|
||||
# qemu.runAsRoot = true;
|
||||
# };
|
||||
|
||||
# lxd.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# This script is used to install the arm translation layer for waydroid
|
||||
# so that we can install arm apks on x86_64 waydroid
|
||||
#
|
||||
# https://github.com/casualsnek/waydroid_script
|
||||
# https://github.com/AtaraxiaSjel/nur/tree/master/pkgs/waydroid-script
|
||||
# https://wiki.archlinux.org/title/Waydroid#ARM_Apps_Incompatible
|
||||
# nur-ataraxiasjel.packages.${pkgs.stdenv.hostPlatform.system}.waydroid-script
|
||||
|
||||
# Need to add [File (in the menu bar) -> Add connection] when start for the first time
|
||||
# virt-manager
|
||||
|
||||
# QEMU/KVM(HostCpuOnly), provides:
|
||||
# qemu-storage-daemon qemu-edid qemu-ga
|
||||
# qemu-pr-helper qemu-nbd elf2dmp qemu-img qemu-io
|
||||
# qemu-kvm qemu-system-x86_64 qemu-system-aarch64 qemu-system-i386
|
||||
qemu_kvm
|
||||
|
||||
# Install QEMU(other architectures), provides:
|
||||
# ......
|
||||
# qemu-loongarch64 qemu-system-loongarch64
|
||||
# qemu-riscv64 qemu-system-riscv64 qemu-riscv32 qemu-system-riscv32
|
||||
# qemu-system-arm qemu-arm qemu-armeb qemu-system-aarch64 qemu-aarch64 qemu-aarch64_be
|
||||
# qemu-system-xtensa qemu-xtensa qemu-system-xtensaeb qemu-xtensaeb
|
||||
# ......
|
||||
qemu
|
||||
];
|
||||
}
|
||||
Reference in new issue
Block a user