add wayland
This commit is contained in:
@@ -6,11 +6,12 @@
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
in
|
||||
{
|
||||
system.stateVersion = "25.11";
|
||||
|
||||
imports = builtins.trace "${inputs.mysecrets}" [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
./network.nix
|
||||
./disk-config.nix
|
||||
./hardware-configuration.nix
|
||||
../../modules/core
|
||||
@@ -36,9 +37,20 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
services.openssh.enable = true;
|
||||
## Enable virtualisation guest settings
|
||||
services.qemuGuest.enable = true;
|
||||
services.spice-vdagentd.enable = true;
|
||||
services.xserver = {
|
||||
videoDrivers = [ "modesetting" ]; # Driver vidéo optimisé pour QEMU/KVM
|
||||
};
|
||||
|
||||
networking.hostName = "${hostname}";
|
||||
environment.systemPackages = [
|
||||
pkgs.spice-gtk # Outils SPICE
|
||||
pkgs.spice-protocol # Protocoles SPICE
|
||||
];
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
#fileSystems."/" = {
|
||||
# device = "/dev/vda2"; # Disque virtuel typique
|
||||
# fsType = "btrfs";
|
||||
#};
|
||||
}
|
||||
|
||||
@@ -20,9 +20,19 @@
|
||||
"virtio_pci"
|
||||
"sr_mod"
|
||||
"virtio_blk"
|
||||
"virtio_scsi"
|
||||
"virtio_net"
|
||||
"virtio_blk"
|
||||
];
|
||||
boot.initrd.kernelModules = [
|
||||
"virtio_balloon"
|
||||
"virtio_console"
|
||||
"virtio_rng"
|
||||
];
|
||||
boot.kernelModules = [
|
||||
"kvm-amd"
|
||||
"virtio-gpu"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
29
hosts/test-kvm/network.nix
Normal file
29
hosts/test-kvm/network.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
hostname,
|
||||
...
|
||||
}:
|
||||
{
|
||||
networking = {
|
||||
hostName = "${hostname}";
|
||||
interfaces.enp1s0 = {
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = "192.168.122.100";
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
};
|
||||
defaultGateway = {
|
||||
address = "192.168.122.1";
|
||||
interface = "enp1s0";
|
||||
};
|
||||
nameservers = [
|
||||
"9.9.9.9"
|
||||
"2001:41d0:303:20da::1"
|
||||
"217.182.138.218"
|
||||
];
|
||||
networkmanager.enable = true;
|
||||
|
||||
firewall.enable = true;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user