add libvirt

This commit is contained in:
DACHXY 2024-12-20 22:35:43 +08:00
parent 356ec43b26
commit 394f71cfb6
7 changed files with 48 additions and 31 deletions

View file

@ -7,6 +7,7 @@
./packages.nix ./packages.nix
./programs.nix ./programs.nix
./environment.nix ./environment.nix
./virtualization.nix
]; ];
nixpkgs = { nixpkgs = {

View file

@ -1,5 +1,4 @@
{ inputs, pkgs, ... }: { pkgs, ... }:
{ {
programs = { programs = {
neovim = { neovim = {

View file

@ -1,6 +1,5 @@
{ config, pkgs, ... }: { ... }:
let {
in {
programs = { programs = {
nushell = { nushell = {
enable = true; enable = true;

View file

@ -0,0 +1,9 @@
{ ... }:
{
dconf.settings = {
"org/virt-manager/virt-manager/connections" = {
autoconnect = [ "qemu:///system" ];
uris = [ "qemu:///system" ];
};
};
}

View file

@ -24,6 +24,6 @@
./wireguard.nix ./wireguard.nix
./dn-ca.nix ./dn-ca.nix
./environment.nix ./environment.nix
./virtualisation.nix ./virtualization.nix
]; ];
} }

View file

@ -1,13 +0,0 @@
{ pkgs, ... }:
{
virtualisation = {
docker.enable = true;
# Run container as systemd service
oci-containers = {
backend = "docker";
containers = {};
};
};
}

View file

@ -0,0 +1,22 @@
{ pkgs, ... }:
{
programs.virt-manager.enable = true;
users.groups.libvirtd.members = [ "danny" ];
virtualisation = {
docker.enable = true;
# Run container as systemd service
oci-containers = {
backend = "docker";
containers = { };
};
libvirtd = {
enable = true;
};
spiceUSBRedirection.enable = true;
};
}