ADD: qemu config
This commit is contained in:
parent
ca0610b675
commit
79917facf3
6 changed files with 201 additions and 143 deletions
43
apps/qemu.nix
Normal file
43
apps/qemu.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
boot.kernelModules = [ "tun" ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
qemu_kvm
|
||||
];
|
||||
services.spice-vdagentd.enable = true;
|
||||
virtualisation.libvirtd = {
|
||||
enable = true ;
|
||||
qemu = {
|
||||
swtpm.enable = true ;
|
||||
ovmf.enable = true ;
|
||||
ovmf.packages = [ pkgs.OVMFFull.fd ];
|
||||
runAsRoot = false ;
|
||||
};
|
||||
};
|
||||
|
||||
users.users.lomig.extraGroups = [ "libvirtd" "kvm" "input" ];
|
||||
networking.firewall.allowedTCPPorts = [ 5900 5901 5902 ] ;
|
||||
networking.useNetworkd = true ;
|
||||
networking.useDHCP = false ;
|
||||
services.resolved.enable = true ;
|
||||
networking.bridges.br0.interfaces = [ "enp11s0" ];
|
||||
|
||||
systemd.network.networks."10-br0" = {
|
||||
matchConfig.Name = "br0";
|
||||
networkConfig.DHCP = "yes" ;
|
||||
};
|
||||
|
||||
# security.wrappers.qemu-bridge-helper = {
|
||||
# source = "${pkgs.qemu_kvm}/libexec/qemu-bridge-helper";
|
||||
# owner = "root";
|
||||
# group = "root";
|
||||
# setuid = true ;
|
||||
# permissions = "u+xs,g+x,o-x";
|
||||
# };
|
||||
|
||||
environment.etc."qemu/bridge.conf".text = ''
|
||||
allow br0
|
||||
'';
|
||||
}
|
||||
# vim: set ts=2 sw=2 sts=2 et :
|
||||
|
|
@ -2,3 +2,4 @@
|
|||
{
|
||||
|
||||
}
|
||||
# vim: set ts=2 sw=2 sts=2 et :
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
./raid.nix
|
||||
./bepovim.nix
|
||||
../../wm/bspwm.nix
|
||||
../../apps/qemu.nix
|
||||
];
|
||||
nix.settings.experimental-features = ["nix-command" "flakes" ];
|
||||
boot.initrd.kernelModules = [];
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
home.packages = with pkgs; [
|
||||
bat
|
||||
nerd-fonts.iosevka
|
||||
obsidian
|
||||
telegram-desktop
|
||||
tree
|
||||
fastfetch
|
||||
|
|
|
|||
12
wm/bspwm.nix
12
wm/bspwm.nix
|
|
@ -1,10 +1,16 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
services.xserver = {
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true ;
|
||||
displayManager.lightdm.enable = true ;
|
||||
displayManager = {
|
||||
lightdm.enable = true ;
|
||||
};
|
||||
windowManager.bspwm.enable = true ;
|
||||
};
|
||||
desktopManager.gnome.enable = lib.mkForce false ;
|
||||
displayManager.gdm.enable = lib.mkForce false ;
|
||||
};
|
||||
home-manager.users.lomig = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
bspwm sxhkd xorg.xinit xterm
|
||||
|
|
|
|||
10
wm/gnome.nix
10
wm/gnome.nix
|
|
@ -1,10 +1,16 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
services = {
|
||||
displayManager.gdm = {
|
||||
displayManager = {
|
||||
gdm = {
|
||||
enable = true ;
|
||||
};
|
||||
};
|
||||
desktopManager.gnome.enable = true ;
|
||||
xserver = {
|
||||
windowManager.bspwm.enable = lib.mkForce false ;
|
||||
displayManager.lightdm.enable = lib.mkForce false ;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue