mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 04:19:22 +08:00
Compare commits
1 Commits
steamdeck
...
libvirt-co
| Author | SHA1 | Date | |
|---|---|---|---|
| 6cece7d3b9 |
@@ -19,7 +19,7 @@ inputs:
|
||||
{
|
||||
xray.client.enable = true;
|
||||
beesd."/".threads = 4;
|
||||
kvm = {};
|
||||
kvm.nodatacow = true;
|
||||
};
|
||||
};
|
||||
boot.initrd.systemd.network.networks."10-eno2" = inputs.config.systemd.network.networks."10-eno2";
|
||||
|
||||
@@ -4,6 +4,7 @@ inputs:
|
||||
{
|
||||
type = types.nullOr (types.submodule { options =
|
||||
{
|
||||
nodatacow = mkOption { type = types.bool; default = false; };
|
||||
autoSuspend = mkOption { type = types.listOf types.nonEmptyStr; default = []; };
|
||||
};});
|
||||
default = null;
|
||||
@@ -38,7 +39,12 @@ inputs:
|
||||
};
|
||||
spiceUSBRedirection.enable = true;
|
||||
};
|
||||
environment.systemPackages = with inputs.pkgs; [ qemu_full win-spice guestfs-tools virt-manager ];
|
||||
environment =
|
||||
{
|
||||
persistence."/nix/nodatacow".directories = inputs.lib.mkIf kvm.nodatacow
|
||||
{ directory = "/var/lib/libvirt/images"; mode = "0711"; };
|
||||
systemPackages = with inputs.pkgs; [ qemu_full win-spice guestfs-tools virt-manager ];
|
||||
};
|
||||
systemd =
|
||||
{
|
||||
services =
|
||||
@@ -117,4 +123,8 @@ inputs:
|
||||
networking.firewall.interfaces."virbr*".allowedUDPPorts = [ 53 67 ];
|
||||
hardware.ksm.enable = true;
|
||||
};
|
||||
|
||||
|
||||
++ inputs.lib.optional (inputs.config.nixos.services.kvm != null)
|
||||
{ directory = "/var/lib/libvirt/images"; mode = "0711"; };
|
||||
}
|
||||
|
||||
@@ -27,9 +27,7 @@ inputs:
|
||||
{
|
||||
hideMounts = true;
|
||||
directories =
|
||||
[{ directory = "/var/log/journal"; user = "root"; group = "systemd-journal"; mode = "u=rwx,g=rx+s,o=rx"; }]
|
||||
++ inputs.lib.optional (inputs.config.nixos.services.kvm != null)
|
||||
{ directory = "/var/lib/libvirt/images"; mode = "0711"; };
|
||||
[{ directory = "/var/log/journal"; user = "root"; group = "systemd-journal"; mode = "u=rwx,g=rx+s,o=rx"; }];
|
||||
};
|
||||
}
|
||||
# 挂载 /home/user
|
||||
|
||||
Reference in New Issue
Block a user