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
./programs.nix
./environment.nix
./virtualization.nix
];
nixpkgs = {

View file

@ -1,14 +1,13 @@
{ inputs, pkgs, ... }:
{ pkgs, ... }:
{
programs = {
neovim = {
enable = true;
withNodeJs = true;
extraLuaPackages = ps: [ ps.magick ];
extraPackages = [ pkgs.imagemagick ];
};
programs = {
neovim = {
enable = true;
withNodeJs = true;
extraLuaPackages = ps: [ ps.magick ];
extraPackages = [ pkgs.imagemagick ];
};
bash.enable = true;
};
};
}

View file

@ -1,6 +1,5 @@
{ config, pkgs, ... }:
let
in {
{ ... }:
{
programs = {
nushell = {
enable = true;
@ -11,13 +10,13 @@ let
carapace.enable = true;
carapace.enableNushellIntegration = true;
starship = {
enable = true;
starship = {
enable = true;
};
zoxide = {
enable = true;
enableNushellIntegration = true;
enable = true;
enableNushellIntegration = 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
./dn-ca.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;
};
}