home/yazi , virgil/vfio

This commit is contained in:
tulg 2025-10-24 21:19:37 +03:00
parent 4a7335198a
commit 1b6c6967d9
8 changed files with 168 additions and 13 deletions

View file

@ -237,7 +237,7 @@ bind = ,121, exec, pactl set-sink-volume @DEFAULT_SINK@ 0%
# other bindings # other bindings
#bind = $mainMod, E, exec, kitty #bind = $mainMod, E, exec, kitty
bind = $mainMod, F, fullscreen bind = $mainMod, F, fullscreen
bind = $mainMod, Q, exec, kitty lf bind = $mainMod, Q, exec, kitty yazi
bind = ,232,exec,brightnessctl -c backlight set 5%- bind = ,232,exec,brightnessctl -c backlight set 5%-
bind = ,233,exec,brightnessctl -c backlight set +5% bind = ,233,exec,brightnessctl -c backlight set +5%
#bind = $mainMod SHIFT,C, exec, killall -9 wpaperd && wpaperd #bind = $mainMod SHIFT,C, exec, killall -9 wpaperd && wpaperd

View file

@ -1,5 +1,5 @@
# interpreter for shell commands # interpreter for shell commands
set shell zsh set shell bash
# set '-eu' options for shell commands # set '-eu' options for shell commands
# These options are used to have safer shell commands. Option '-e' is used to # These options are used to have safer shell commands. Option '-e' is used to

1
config/lf/preview Executable file
View file

@ -0,0 +1 @@
kitty +kitten icat --silent --stdin no --transfer-mode file --place "${w}x${h}@${x}x${y}" "$file" < /dev/null > /dev/tty

73
flake.lock generated
View file

@ -121,6 +121,24 @@
} }
}, },
"flake-parts": { "flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
},
"locked": {
"lastModified": 1756770412,
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "4524271976b625a4a605beefd893f270620fd751",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"stylix", "stylix",
@ -234,6 +252,43 @@
"type": "github" "type": "github"
} }
}, },
"nix-std": {
"locked": {
"lastModified": 1710870712,
"narHash": "sha256-e+7MJF2gsgTBuOWv4mCimSP0D9+naeFSw9a7N3yEmv4=",
"owner": "chessai",
"repo": "nix-std",
"rev": "31bbc925750cc9d8f828fe55cee1a2bd985e0c00",
"type": "github"
},
"original": {
"owner": "chessai",
"repo": "nix-std",
"type": "github"
}
},
"nixos-vfio": {
"inputs": {
"flake-parts": "flake-parts",
"nix-std": "nix-std",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1758101070,
"narHash": "sha256-oJ01wfI1YIvU+9MHN0C/eE3UX2odVoBm8DAPgy8Bkf8=",
"owner": "j-brn",
"repo": "nixos-vfio",
"rev": "bcbc23d59d6adc871fdd19d14420c26b98f4de93",
"type": "github"
},
"original": {
"owner": "j-brn",
"repo": "nixos-vfio",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1760524057, "lastModified": 1760524057,
@ -265,6 +320,21 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-lib_2": {
"locked": {
"lastModified": 1754788789,
"narHash": "sha256-x2rJ+Ovzq0sCMpgfgGaaqgBSwY+LST+WbZ6TytnT9Rk=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "a73b9c743612e4244d865a2fdee11865283c04e6",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1760524057, "lastModified": 1760524057,
@ -355,6 +425,7 @@
"disko": "disko", "disko": "disko",
"home-manager": "home-manager", "home-manager": "home-manager",
"nix-colors": "nix-colors", "nix-colors": "nix-colors",
"nixos-vfio": "nixos-vfio",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"noctalia": "noctalia", "noctalia": "noctalia",
"quickshell": "quickshell", "quickshell": "quickshell",
@ -389,7 +460,7 @@
"base16-helix": "base16-helix", "base16-helix": "base16-helix",
"base16-vim": "base16-vim", "base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme", "firefox-gnome-theme": "firefox-gnome-theme",
"flake-parts": "flake-parts", "flake-parts": "flake-parts_2",
"gnome-shell": "gnome-shell", "gnome-shell": "gnome-shell",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"

View file

@ -20,6 +20,8 @@
}; };
nix-colors.url = "github:misterio77/nix-colors"; nix-colors.url = "github:misterio77/nix-colors";
nixos-vfio.url = "github:/j-brn/nixos-vfio";
nixos-vfio.inputs.nixpkgs.follows = "nixpkgs";
zen-browser = { zen-browser = {
url = "github:0xc000022070/zen-browser-flake"; url = "github:0xc000022070/zen-browser-flake";

View file

@ -23,7 +23,7 @@
nameservers = ["127.0.0.1" "::1"]; nameservers = ["127.0.0.1" "::1"];
}; };
services.dnscrypt-proxy2 = { services.dnscrypt-proxy = {
enable = true; enable = true;
settings = { settings = {
listen_addresses = ["127.0.0.1:53" "[::1]:53"]; listen_addresses = ["127.0.0.1:53" "[::1]:53"];
@ -66,7 +66,7 @@
programs.virt-manager.enable = true; programs.virt-manager.enable = true;
virtualisation.libvirtd = { virtualisation.libvirtd = {
enable = true; enable = true;
qemuRunAsRoot = false; qemu.runAsRoot = false;
onBoot = "ignore"; onBoot = "ignore";
onShutdown = "shutdown"; onShutdown = "shutdown";
}; };
@ -80,6 +80,7 @@
# wget # wget
git git
rose-pine-gtk-theme rose-pine-gtk-theme
virtiofsd
]; ];
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are

View file

@ -1,10 +1,67 @@
{ {
config, config,
pkgs, pkgs,
lib,
inputs,
... ...
}: { }: {
imports = [
inputs.nixos-vfio.nixosModules.vfio
];
boot.kernelParams = ["amd_iommu=on"]; boot.kernelParams = ["amd_iommu=on"];
boot.blacklistedKernelModules = ["nvidia" "nouveau"]; boot.blacklistedKernelModules = ["nvidia" "nouveau"];
boot.extraModulePackages = [ config.boot.kernelPackages.kvmfr ];
boot.kernelModules = ["vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio"]; boot.kernelModules = ["vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio"];
boot.extraModprobeConfig = "options vfio-pci ids=10de:2705,10de:22bb"; boot.extraModprobeConfig = "options vfio-pci ids=10de:2705,10de:22bb";
virtualisation.libvirtd = {
deviceACL = [
"/dev/kvm"
"/dev/kvmfr0"
"/dev/kvmfr1"
"/dev/kvmfr2"
"/dev/shm/scream"
"/dev/shm/looking-glass"
"/dev/null"
"/dev/full"
"/dev/zero"
"/dev/random"
"/dev/urandom"
"/dev/ptmx"
"/dev/kvm"
"/dev/kqemu"
"/dev/rtc"
"/dev/hpet"
"/dev/vfio/vfio"
];
};
virtualisation.spiceUSBRedirection.enable = true;
virtualisation.vfio = {
enable = true;
IOMMUType = "amd";
devices = [
"10de:2705"
"10de:22bb"
];
};
virtualisation.kvmfr = {
enable = true;
devices = lib.singleton {
size = 128;
permissions = {
user = "tulg";
mode = "0777";
};
};
};
} }

View file

@ -44,12 +44,12 @@ in {
swww swww
grim grim
slurp slurp
lf
inxi inxi
pistol pistol
waybar waybar
wofi wofi
mako mako
feh
kitty kitty
libsForQt5.qtstyleplugin-kvantum libsForQt5.qtstyleplugin-kvantum
libsForQt5.qt5ct libsForQt5.qt5ct
@ -57,15 +57,20 @@ in {
]; ];
programs.vscode = { programs.vscode = {
enable = true; enable = true;
extensions = with pkgs.vscode-extensions; [ profiles.default.extensions = with pkgs.vscode-extensions; [
#pkgs.vscode-extensions.bbenoist.nix #pkgs.vscode-extensions.bbenoist.nix
pkgs.vscode-extensions.kamadorueda.alejandra pkgs.vscode-extensions.kamadorueda.alejandra
pkgs.vscode-extensions.jnoortheen.nix-ide pkgs.vscode-extensions.jnoortheen.nix-ide
]; ];
profiles.tulg.userSettings = {
};
}; };
programs.zen-browser.enable = true; programs.zen-browser.enable = true;
programs.zsh.enable = true;
programs.zen-browser.policies = { programs.zen-browser.policies = {
DisableAppUpdate = true; DisableAppUpdate = true;
DisableTelemetry = true; DisableTelemetry = true;
@ -77,6 +82,22 @@ in {
# theme = spicePkgs.themes.ziro; # theme = spicePkgs.themes.ziro;
# colorScheme = "rose-pine-moon"; # colorScheme = "rose-pine-moon";
}; };
programs.yazi = {
enable = true;
settings = {
mgr = {
ratio = [1 1 6];
};
preview = {
max_width = 1000;
max_height = 900;
};
tasks = {
image_bound = [ 0 0 ];
};
};
};
xdg.configFile."hypr" = { xdg.configFile."hypr" = {
source = symlink "${dots}/hypr"; source = symlink "${dots}/hypr";
@ -103,10 +124,10 @@ in {
recursive = true; recursive = true;
}; };
xdg.configFile."lf" = { #xdg.configFile."lf" = {
source = symlink "${dots}/lf"; # source = symlink "${dots}/lf";
recursive = true; # recursive = true;
}; #};
programs.firefox.enable = true; programs.firefox.enable = true;
programs.bash = { programs.bash = {
enable = true; enable = true;
@ -123,8 +144,10 @@ in {
programs.git = { programs.git = {
enable = true; enable = true;
userName = "tulg"; settings = {
userEmail = "tulg@protonmail.ch"; user.name = "tulg";
user.email = "tulg@protonmail.ch";
};
}; };
# gtk = { # gtk = {