113 lines
2.3 KiB
Nix
113 lines
2.3 KiB
Nix
{
|
|
pkgs,
|
|
inputs,
|
|
...
|
|
}:
|
|
let
|
|
unstable = inputs.nixpkgs-unstable.legacyPackages.${pkgs.stdenv.hostPlatform.system};
|
|
in
|
|
{
|
|
imports = [
|
|
../shared/nixos.nix
|
|
../../features/kde.nix
|
|
../../features/flatpak.nix
|
|
];
|
|
|
|
boot = {
|
|
extraModulePackages = [
|
|
pkgs.i915-sriov
|
|
];
|
|
|
|
kernelParams = [
|
|
"intel_iommu=on"
|
|
"i915-enable_guc=3"
|
|
"i915.max_vfs=1"
|
|
"module_blacklist=xe"
|
|
];
|
|
};
|
|
|
|
systemd.tmpfiles.rules = [
|
|
"w /sys/devices/pci0000:00/0000:00:02.0/sriov_numvfs - - - - 1"
|
|
];
|
|
|
|
networking.hostName = "pdw-frankiel";
|
|
|
|
services = {
|
|
udev.packages = [
|
|
(pkgs.writeTextFile {
|
|
name = "i915-sriov";
|
|
|
|
text = ''
|
|
ACTION=="add", SUBSYSTEM=="pci", KERNEL=="0000:00:02.[1-7]", ATTR{vendor}=="0x8086", ATTR{device}=="0xa7a0", DRIVER!="vfio-pci", RUN+="/bin/sh -c 'echo \$kernel > /sys/bus/pci/devices/\$kernel/driver/unbind; echo vfio-pci > /sys/bus/pci/devices/\$kernel/driver_override; modprobe vfio-pci; echo \$kernel > /sys/bus/pci/drivers/vfio-pci/bind'"
|
|
'';
|
|
|
|
destination = "/etc/udev/rules.d/80-i915-sriov.rules";
|
|
})
|
|
];
|
|
|
|
printing.enable = true;
|
|
|
|
keyd = {
|
|
enable = true;
|
|
|
|
keyboards = {
|
|
default = {
|
|
ids = [ "*" ];
|
|
|
|
settings = {
|
|
main = {
|
|
capslock = "oneshot(control)";
|
|
insert = "S-insert";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
flatpak = {
|
|
packages = [
|
|
{
|
|
appId = "com.dropbox.Client";
|
|
origin = "flathub";
|
|
}
|
|
{
|
|
appId = "io.mpv.Mpv";
|
|
origin = "flathub";
|
|
}
|
|
{
|
|
appId = "org.gnome.gitlab.YaLTeR.VideoTrimmer";
|
|
origin = "flathub";
|
|
}
|
|
{
|
|
appId = "org.kde.kdenlive";
|
|
origin = "flathub";
|
|
}
|
|
{
|
|
appId = "org.remmina.Remmina";
|
|
origin = "flathub";
|
|
}
|
|
{
|
|
appId = "io.github.ungoogled_software.ungoogled_chromium";
|
|
origin = "flathub";
|
|
}
|
|
{
|
|
appId = "org.gtk.Gtk3theme.Breeze";
|
|
origin = "flathub";
|
|
}
|
|
];
|
|
};
|
|
};
|
|
|
|
environment = {
|
|
systemPackages = with pkgs; [
|
|
qimgv
|
|
zathura
|
|
hunspell
|
|
hunspellDicts.en_US
|
|
hyphenDicts.en_US
|
|
|
|
unstable.libreoffice-qt
|
|
];
|
|
};
|
|
}
|