nixos-cesium/config/vm-guest.nix
2026-02-15 17:13:29 +01:00

45 lines
1.3 KiB
Nix

{ pkgs, lib, ... }:
let
spice-vdagent-desktop = pkgs.makeDesktopItem {
name = "spice-vdagent-custom";
desktopName = "Spice vdagent Custom";
comment = "Startet das Clipboard für QEMU/Spice";
exec = "${pkgs.spice-vdagent}/bin/spice-vdagent";
terminal = false;
type = "Application";
categories = [ "Network" ];
extraConfig.StartupNotify = "false";
extraConfig."X-GNOME-Autostart-enabled" = "true";
};
in
{
environment.systemPackages = with pkgs; [
spice-vdagent
phodav
wl-clipboard
spice-vdagent-desktop
];
# List services that you want to enable:
services.spice-vdagentd.enable = true;
services.spice-webdavd.enable = true;
services.gvfs.enable = true;
services.qemuGuest.enable = true;
networking.hostName = lib.mkForce "cesium-vm";
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 9843 22 ];
# Enable the OpenSSH daemon.
services.openssh.enable = true;
users.users.sebastian.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL/i/b9o5LKRr+h7vwq1dLCQ+vz9DTf4EvaLeCRUxtIZ sebastian@cesium"
];
# Symlink für Autostart
environment.etc."xdg/autostart/spice-vdagent-custom.desktop".source =
"${spice-vdagent-desktop}/share/applications/spice-vdagent-custom.desktop";
}