From 5c21de5ca194f3e5622be306698dff00dee34077 Mon Sep 17 00:00:00 2001 From: Origami404 Date: Fri, 28 Jun 2024 09:09:05 +0800 Subject: [PATCH] [home] add virt-manager --- configuration.nix | 1 + hardware-configuration.nix | 6 ++++++ home/modules/desktop.nix | 16 ++++++++++++++++ 3 files changed, 23 insertions(+) diff --git a/configuration.nix b/configuration.nix index 4e42208..cf0294c 100644 --- a/configuration.nix +++ b/configuration.nix @@ -147,6 +147,7 @@ simple-scan ]); + virtualisation.libvirtd.enable = true; services.tailscale.enable = true; # Users diff --git a/hardware-configuration.nix b/hardware-configuration.nix index acab9ba..e3bbd4c 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -45,6 +45,12 @@ in options = [ "${btrfs-options},subvol=@docker" ]; }; + fileSystems."/var/lib/libvirt" = + { device = "/dev/disk/by-uuid/1b3938f0-358f-4358-b7fb-b448b6eba56a"; + fsType = "btrfs"; + options = [ "subvol=@libvirt" ]; + }; + swapDevices = [ ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking diff --git a/home/modules/desktop.nix b/home/modules/desktop.nix index ca96b15..304dbfe 100644 --- a/home/modules/desktop.nix +++ b/home/modules/desktop.nix @@ -1,5 +1,20 @@ { pkgs, lib, config, ... }: { + + # This can update XDG_DATA_DIR in .profile, which + # make applications show up in GNOME's application menu. + # See: https://github.com/nix-community/home-manager/issues/1439#issuecomment-673944201 + programs.bash.enable = true; + targets.genericLinux.enable = true; + xdg.enable = true; + home.activation = { + linkDesktopApplications = { + after = [ "writeBoundary" "createXdgUserDirectories" ]; + before = [ ]; + data = "${pkgs.desktop-file-utils}/bin/update-desktop-database"; + }; + }; + home.packages = with pkgs; [ desktop-file-utils @@ -8,6 +23,7 @@ mpv feishu moonlight-qt + virt-manager ]; # An Apple Music client, only can be downloaded after purchasing