Skip to content

Commit

Permalink
nixos: add kernel module vhost_net
Browse files Browse the repository at this point in the history
  • Loading branch information
Martins3 committed Dec 11, 2023
1 parent 3601643 commit 10c611d
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 2 deletions.
11 changes: 11 additions & 0 deletions kernel/guest-setup/fedora.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,14 @@ sudo dnf install microsoft-edge-beta
```

## 将默认的文件系统记得换一下

btrfs 感觉问题很大啊

## 切换内核


sudo dnf copr enable kwizart/kernel-longterm-5.15 fedora-38-x86_64

https://copr.fedorainfracloud.org/coprs/kwizart/kernel-longterm-5.15/

这个方法不好用,还不如直接下载 rpm 来安装的
3 changes: 2 additions & 1 deletion kernel/guest-setup/oe23.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ install libtool
install systemd-devel
install bcc

install vim htop perf elfutils elfutils-libelf-devel iperf3
install vim htop perf elfutils elfutils-libelf-devel iperf3 sysstat


install pam-devel
install numactl fio libaio-devel
Expand Down
4 changes: 4 additions & 0 deletions nixpkgs/home/cli.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ in
# libguestfs
# libguestfs-appliance
cloud-utils
imagemagick # 压缩照片
adoptopenjdk-icedtea-web
ccls
cargo
Expand All @@ -35,6 +36,9 @@ in
ov # feature rich pager
# zig
dracut
iw
termshark
openvswitch
gnumake
audit # 没啥意义,用不起来
yarn
Expand Down
1 change: 1 addition & 0 deletions nixpkgs/home/gui.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ in
# variety # wallpaper 但是 bing wallpaper 已经够好了
kitty
wezterm
wireshark
unstable.alacritty
# zoom-us
# spotify
Expand Down
3 changes: 2 additions & 1 deletion nixpkgs/system.nix
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ in
# programs.steam.enable = true; # steam 安装

# @todo 加入的 vfio 参考 https://gist.github.com/CRTified/43b7ce84cd238673f7f24652c85980b3 不过他的感觉也是瞎写的
boot.kernelModules = [ "vfio_pci" "vfio_iommu_type1" "vmd" "null_blk" "scsi_debug" ];
boot.kernelModules = [ "vfio_pci" "vfio_iommu_type1"
"vmd" "null_blk" "scsi_debug" "vhost_net" ];
boot.initrd.kernelModules = [];
boot.blacklistedKernelModules = [ "nouveau" ];

Expand Down
3 changes: 3 additions & 0 deletions scripts/systemd/martins3.config
Original file line number Diff line number Diff line change
Expand Up @@ -589,3 +589,6 @@ CONFIG_ZSTD_COMPRESS=y

CONFIG_HOTPLUG_PCI_ACPI=y
# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set

CONFIG_NET_DEVLINK=y
CONFIG_NETDEVSIM=y

0 comments on commit 10c611d

Please sign in to comment.