SP-IOV test

This commit is contained in:
Aleksandr Lebedev 2025-10-04 14:23:21 +02:00
parent 3aa32a065d
commit 965609b07a
4 changed files with 46 additions and 3 deletions

17
flake.lock generated
View file

@ -1839,6 +1839,7 @@
"snowfall-flake": "snowfall-flake", "snowfall-flake": "snowfall-flake",
"snowfall-lib": "snowfall-lib_3", "snowfall-lib": "snowfall-lib_3",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"sr-iov": "sr-iov",
"stylix": "stylix", "stylix": "stylix",
"unstable": "unstable" "unstable": "unstable"
} }
@ -2033,6 +2034,22 @@
"type": "github" "type": "github"
} }
}, },
"sr-iov": {
"flake": false,
"locked": {
"lastModified": 1725366839,
"narHash": "sha256-w6Txt0vtnvsjRusFMPwFN3q4MPdBK34EFmZd3649XTg=",
"owner": "cyberus-technology",
"repo": "nixos-sriov",
"rev": "6bfcad7698afebbfead331826ee77f0b970603ed",
"type": "github"
},
"original": {
"owner": "cyberus-technology",
"repo": "nixos-sriov",
"type": "github"
}
},
"stylix": { "stylix": {
"inputs": { "inputs": {
"base16": "base16", "base16": "base16",

View file

@ -94,6 +94,10 @@
url = "github:Sveske-Juice/declarative-jellyfin"; url = "github:Sveske-Juice/declarative-jellyfin";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
sr-iov = {
url = "github:cyberus-technology/nixos-sriov";
flake = false;
};
}; };
outputs = inputs: let outputs = inputs: let

View file

@ -19,7 +19,7 @@ in {
}; };
services.fwupd.enable = true; #fwupdmgr update services.fwupd.enable = true; #fwupdmgr update
boot = { boot = {
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; #kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
loader = { loader = {
systemd-boot.enable = !config.${namespace}.hardware.secureBoot.enable; systemd-boot.enable = !config.${namespace}.hardware.secureBoot.enable;
efi.canTouchEfiVariables = !config.${namespace}.hardware.asahi.enable; efi.canTouchEfiVariables = !config.${namespace}.hardware.asahi.enable;
@ -29,6 +29,12 @@ in {
# It will just not appear on screen unless a key is pressed # It will just not appear on screen unless a key is pressed
loader.timeout = 0; loader.timeout = 0;
}; };
services.logind = {
lidSwitch = mkDefault "suspend";
powerKey = mkDefault "suspend";
powerKeyLongPress = mkDefault "poweroff";
};
# Set your time zone. # Set your time zone.
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";

View file

@ -31,9 +31,25 @@ in
with lib.custom; { with lib.custom; {
facter.reportPath = ./facter.json; facter.reportPath = ./facter.json;
systemd.network.wait-online.enable = lib.mkForce false; #facter systemd.network.wait-online.enable = lib.mkForce false; #facter
imports = [
custom.hardware.hibernation = { "${inputs.sr-iov}/sriov.nix"
];
virtualisation.cyberus.intel-graphics-sriov.enable = true;
virtualisation.virtualbox.host = {
enable = true; enable = true;
package =
(import (pkgs.fetchFromGitHub {
owner = "nixos";
repo = "nixpkgs";
rev = "0398740424de50bc851ece775b19cc5d5eb755e9";
sha256 = "sha256-ZA9s5LroljnJtU4HcGSGB2sqGcSVO3OD+qz5wo+wmlE=";
}) {inherit (pkgs) system;}).virtualbox;
enableKvm = true;
enableHardening = false;
addNetworkInterface = false;
};
custom.hardware.hibernation = {
enable = false;
swapFileOffset = 533760; swapFileOffset = 533760;
}; };
custom.presets.disko.impermanenceBtrfsLuks = { custom.presets.disko.impermanenceBtrfsLuks = {