From bc2c8e5f04b56c84022687e2f7847891a1835b4f Mon Sep 17 00:00:00 2001 From: Julian Sutter Date: Mon, 13 Mar 2023 09:48:20 -0700 Subject: [PATCH] back to virtual box and other fixes --- flake.lock | 12 ++++++------ flake.nix | 5 +++-- modules/gnome.nix | 7 +++++++ modules/plasma.nix | 7 +++++++ modules/virtualization.nix | 20 ++++++++++++++++++++ systems/aurora.nix | 5 +++++ systems/common.nix | 21 --------------------- 7 files changed, 48 insertions(+), 29 deletions(-) create mode 100644 modules/virtualization.nix diff --git a/flake.lock b/flake.lock index 7a3ce56..f535bc8 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1678109311, - "narHash": "sha256-Q64FoCH5rp3XHoC8u1+KyjLEFGTY7kX9YaIaYfugvfY=", + "lastModified": 1678714646, + "narHash": "sha256-L7u4ua/p3cTptqlTVwT1OaQMGkexULjQhKmUxRUYmMQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "04d6cad67557512452decbfe888c68fa11338a96", + "rev": "7fe539dfbba8a158a455b54697d1bd7e97b37c60", "type": "github" }, "original": { @@ -23,11 +23,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1677932085, - "narHash": "sha256-+AB4dYllWig8iO6vAiGGYl0NEgmMgGHpy9gzWJ3322g=", + "lastModified": 1678654296, + "narHash": "sha256-aVfw3ThpY7vkUeF1rFy10NAkpKDS2imj3IakrzT0Occ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3c5319ad3aa51551182ac82ea17ab1c6b0f0df89", + "rev": "5a1dc8acd977ff3dccd1328b7c4a6995429a656b", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 12f12c5..9949ef0 100644 --- a/flake.nix +++ b/flake.nix @@ -27,8 +27,9 @@ ./systems/common.nix ./systems/aurora.nix ./users/jsutter.nix - ./modules/plasma.nix - ./modules/ml.nix + ./modules/plasma.nix + ./modules/ml.nix + ./modules/virtualization.nix ]; }; }; diff --git a/modules/gnome.nix b/modules/gnome.nix index cc50741..9a70be9 100644 --- a/modules/gnome.nix +++ b/modules/gnome.nix @@ -111,4 +111,11 @@ home-manager.users.jsutter = { }; }; }; + # GNUPG Stuff + services.pcscd.enable = true; + programs.gnupg.agent = { + enable = true; + pinentryFlavor = "gnome3"; + enableSSHSupport = true; + }; } \ No newline at end of file diff --git a/modules/plasma.nix b/modules/plasma.nix index 38520d2..32bb626 100644 --- a/modules/plasma.nix +++ b/modules/plasma.nix @@ -16,4 +16,11 @@ environment.systemPackages = with pkgs; [ spectacle ]; + # GNUPG Stuff + services.pcscd.enable = true; + programs.gnupg.agent = { + enable = true; + pinentryFlavor = "qt"; + enableSSHSupport = true; + }; } diff --git a/modules/virtualization.nix b/modules/virtualization.nix new file mode 100644 index 0000000..b187ff5 --- /dev/null +++ b/modules/virtualization.nix @@ -0,0 +1,20 @@ +{ config, pkgs, home-manager, ... }: + +{ + virtualisation = { + docker = { + enable = true; + autoPrune = { + enable = true; + dates = "weekly"; + }; + }; + libvirtd.enable = true; + spiceUSBRedirection.enable = true; + virtualbox.host = { + enable = true; + enableExtensionPack = true; + }; + }; + users.extraGroups.vboxusers.members = [ "jsutter" ]; +} diff --git a/systems/aurora.nix b/systems/aurora.nix index fc3b21d..8a94cfe 100644 --- a/systems/aurora.nix +++ b/systems/aurora.nix @@ -12,6 +12,11 @@ hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.video.hidpi.enable = lib.mkDefault true; + fileSystems."/mnt/data" = + { device = "/dev/disk/by-label/data"; + fsType = "btrfs"; + }; + services.xserver.videoDrivers = [ "amdgpu" ]; hardware.opengl.extraPackages = with pkgs; [ diff --git a/systems/common.nix b/systems/common.nix index 70ff866..d37bcc5 100644 --- a/systems/common.nix +++ b/systems/common.nix @@ -113,25 +113,4 @@ services.xserver.excludePackages = [ pkgs.xterm ]; documentation.nixos.enable = false; - - # GNUPG Stuff - services.pcscd.enable = true; - programs.gnupg.agent = { - enable = true; - pinentryFlavor = "gnome3"; - enableSSHSupport = true; - }; - - # Docker & VirtualBox. - virtualisation = { - docker = { - enable = true; - autoPrune = { - enable = true; - dates = "weekly"; - }; - }; - libvirtd.enable = true; - spiceUSBRedirection.enable = true; - }; }