refactor: trim unused virtualisation config and packages (#332)

This commit is contained in:
ryan4yin | 二花 authored and GitHub committed 2026-10-01 19:42:20 +08:00
1 parent 1546e54bb2
commit 8f9fdda2bb
17 files changed
+71 -203

No files matched your search

-5
View File
@@ -6,16 +6,11 @@
# it provides the command `nom` works just like `nix
# with more details log output
nix-output-monitor
hydra-check # check hydra(nix's build farm) for the build status of a package
nix-index # A small utility to index nix store paths
nix-init # generate nix derivation from url
# https://github.com/nix-community/nix-melt
nix-melt # A TUI flake.lock viewer
# https://github.com/utdemir/nix-tree
nix-tree # A TUI to visualize the dependency graph of a nix derivation
# misc
cowsay
gnupg
caddy # A webserver with automatic HTTPS via Let's Encrypt(replacement of nginx)
# A fast and polyglot tool for code searching, linting, rewriting at large scale
+5 -17
View File
@@ -9,25 +9,13 @@
home.file.".terraformrc".source = ./terraformrc;
home.packages = with pkgs; [
# infrastructure as code
# pulumi
# pulumictl
# tf2pulumi
# crd2pulumi
# pulumiPackages.pulumi-random
# pulumiPackages.pulumi-command
# pulumiPackages.pulumi-aws-native
# pulumiPackages.pulumi-language-go
# pulumiPackages.pulumi-language-python
# pulumiPackages.pulumi-language-nodejs
# doctl # digitalocean
aliyun-cli
# aws
awscli2
ssm-session-manager-plugin # Amazon SSM Session Manager Plugin
# ssm-session-manager-plugin # Amazon SSM Session Manager Plugin
aws-iam-authenticator
eksctl
# eksctl
# google cloud
(pkgs-stable.google-cloud-sdk.withExtraComponents (
@@ -36,12 +24,12 @@
gke-gcloud-auth-plugin
]
))
google-cloud-sql-proxy
# google-cloud-sql-proxy
google-alloydb-auth-proxy
# cloud tools that nix do not have cache for.
terraform
terraformer # generate terraform configs from existing cloud resources
packer # machine image builder
# terraformer # generate terraform configs from existing cloud resources
# packer # machine image builder
];
}
+10 -8
View File
@@ -8,9 +8,16 @@
home.packages = with pkgs; [
podman-compose
dive # explore docker layers
lazydocker # Docker terminal UI.
skopeo # copy/sync images between registries and local storage
go-containerregistry # provides `crane` & `gcrane`, it's similar to skopeo
# `skopeo`: inspect/move images between registries and local formats
# (oci / dir / docker-archive) without a daemon; also supports sync + signing.
# skopeo list-tags docker://nginx # list tags
# skopeo inspect docker://nginx:latest # inspect, no pull
# skopeo copy docker://src:1 docker://dst:1 # registry -> registry
# skopeo copy --all docker://src:1 docker://dst:1 # every architecture
# skopeo copy docker://nginx:latest oci:/tmp/n:latest
# skopeo sync --src docker --dest dir nginx /tmp/n
skopeo
kubectl
kustomize
@@ -18,19 +25,14 @@
kubectx # kubectx & kubens
kubie # same as kubectl-ctx, but per-shell (won’t touch kubeconfig).
kubectl-view-secret # kubectl view-secret
kubectl-tree # kubectl tree
kubectl-node-shell # exec into node
kubepug # kubernetes pre upgrade checker
kubectl-cnpg # cloudnative-pg's cli tool
kubebuilder
istioctl
clusterctl # for kubernetes cluster-api
pkgs-2505.kubernetes-helm
fluxcd
# argocd
ko # build go project to container image
];
programs.k9s.enable = true;
+3 -12
View File
@@ -20,14 +20,14 @@
[
colmena # nixos's remote deployment tool
tokei # count lines of code, alternative to cloc
# db related
# mycli
pgcli
mongosh
sqlite
# spreadsheets / data files: interactive viewer for csv, xlsx, tsv, json, sqlite
visidata
# embedded development
minicom
@@ -35,18 +35,9 @@
python313Packages.huggingface-hub # huggingface-cli
yt-dlp # youtube/bilibili/soundcloud/... video/music downloader
# misc
devbox
bfg-repo-cleaner # remove large files from git history
k6 # load testing tool
# solve coding extercises - learn by doing
exercism
# Automatically trims your branches whose tracking remote refs are merged or gone
# It's really useful when you work on a project for a long time.
git-trim
gitleaks
]
# conda is not available on macOS
++ lib.optionals pkgs.stdenv.hostPlatform.isLinux [
-1
View File
@@ -30,7 +30,6 @@
#-- markdown
marksman # language server for markdown
glow # markdown previewer
pandoc # document converter
pkgs-master.hugo # static site generator
+8 -41
View File
@@ -1,5 +1,4 @@
{
lib,
pkgs,
pkgs-stable,
pkgs-master,
@@ -19,46 +18,14 @@ let
};
in
{
home.packages =
with pkgs-stable;
[
# creative
# gimp # image editing, I prefer using figma in browser instead of this one
inkscape # vector graphics
krita # digital painting
musescore # music notation
pkgs-master.orca-slicer # 3d printer slicer app
bambu-studio # bambu 3d printer slicer app
pkgs-blender.blender # 3d modeling
# reaper # audio production
# sonic-pi # music programming
# 2d game design
# aseprite # Animated sprite editor & pixel art tool
# this app consumes a lot of storage, so do not install it currently
# kicad # 3d printing, electrical engineering
# Astronomy
stellarium # See what you can see with your eyes, binoculars or a small telescope.
celestia # Real-time 3D simulation of space, travel throughout the solar system.
# office
libreoffice-qt-still
hunspell # spell check for libreoffice
hunspellDicts.en_US # USA English
hyphenDicts.en_GB # British English
]
++ (lib.optionals pkgs.stdenv.hostPlatform.isx86_64 [
ldtk # A modern, versatile 2D level editor
# fpga
# python313Packages.apycula # gowin fpga
# yosys # fpga synthesis
# nextpnr # fpga place and route
# openfpgaloader # fpga programming
# nur-ryan4yin.packages.${pkgs.stdenv.hostPlatform.system}.gowin-eda-edu-ide # app: `gowin-env` => `gw_ide` / `gw_pack` / ...
]);
home.packages = with pkgs-stable; [
# creative
krita # digital painting
musescore # music notation
pkgs-master.orca-slicer # 3d printer slicer app
bambu-studio # bambu 3d printer slicer app
pkgs-blender.blender # 3d modeling
];
programs = {
# live streaming
+2 -4
View File
@@ -17,14 +17,12 @@
home.packages = with pkgs; [
wl-clipboard # copying and pasting
hyprpicker # color picker
brightnessctl
# audio
alsa-utils # provides amixer/alsamixer/...
# screen recording
wf-recorder # screen recording
virt-viewer # vnc connect to the libvirt VMs
virt-manager # manage the libvirt VMs
virt-viewer # vnc/spice console for the libvirt VMs
];
# Emergency session-menu fallback; the normal flow uses Noctalia's session panel.
+2 -2
View File
@@ -17,8 +17,8 @@ in
boot.initrd.systemd.enable = true;
environment.systemPackages = [
# `sudo ncdu -x /`
pkgs.ncdu
# `sudo gdu -x /`
pkgs.gdu
];
# NOTE: `preservation` only mounts the directory/file list below to /persistent
+3
View File
@@ -59,6 +59,9 @@ in
modules.btrbk.enable = true;
# HDD tuning/diagnostics for the two spinning disks behind the USB-SATA bridge.
environment.systemPackages = [ pkgs.hdparm ];
# Beelink GTR5: Radeon iGPU. The ROCm build of btop shows the GPU panel;
# node_exporter's drm collector exposes its utilization/VRAM.
modules.btop.package = pkgs.btop-rocm;
+3
View File
@@ -62,6 +62,9 @@ in
modules.btrbk.enable = true;
# QEMU/KVM(HostCpuOnly) for local VMs.
environment.systemPackages = [ pkgs.qemu_kvm ];
powerManagement.resumeCommands = ''
# Insta360 Link may stay enumerated with a stalled UVC endpoint after S3 resume.
${pkgs.coreutils}/bin/sleep 1
+4 -2
View File
@@ -18,8 +18,10 @@ in
boot.initrd.systemd.enable = true;
environment.systemPackages = [
# `sudo ncdu -x /`
pkgs.ncdu
# Whole-filesystem disk usage (`-x` stays on one filesystem):
# sudo gdu -n -x / # non-interactive, plain text
# sudo gdu -o /tmp/gdu.json / # JSON export
pkgs.gdu
];
# There are two ways to clear the root filesystem on every boot:
+4
View File
@@ -60,6 +60,10 @@ in
# Validate Hardware Virtualization Support via:
# virt-host-validate qemu
libvirt
# QEMU/KVM(HostCpuOnly) for the libvirt domains and the microVMs; provides
# qemu-kvm, qemu-img, qemu-nbd, ...
qemu_kvm
];
networking = {
+1 -1
View File
@@ -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
+2 -15
View File
@@ -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
-7
View File
@@ -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
+24
View File
@@ -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" ];
};
};
};
}
-88
View File
@@ -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
];
}