From afc25be6338f997d5abfb113215a323725cc2f2b Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Tue, 12 Dec 2023 16:12:15 +0100 Subject: [PATCH] set groups in the module files --- flake.nix | 1 + modules/virt-manager.nix | 3 ++- modules/wireshark.nix | 2 ++ users/kopatz/default.nix | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index f1bc4a9..587da8f 100644 --- a/flake.nix +++ b/flake.nix @@ -155,6 +155,7 @@ ./modules/virt-manager.nix ./modules/vmware-host.nix ./modules/ssh.nix + ./modules/wireshark.nix #./modules/static-ip.nix #./modules/no-sleep-lid-closed.nix #./modules/wake-on-lan.nix diff --git a/modules/virt-manager.nix b/modules/virt-manager.nix index 0630442..5ad394c 100644 --- a/modules/virt-manager.nix +++ b/modules/virt-manager.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ config, pkgs, ... }: { programs.dconf.enable = true; # virt-manager requires dconf to remember settings environment.systemPackages = with pkgs; [ virt-manager virtiofsd ]; @@ -16,4 +16,5 @@ spiceUSBRedirection.enable = true; }; services.spice-vdagentd.enable = true; + users.users.${config.mainUser.name}.extraGroups = [ "libvirtd" ]; } diff --git a/modules/wireshark.nix b/modules/wireshark.nix index dd208ef..9782a8d 100644 --- a/modules/wireshark.nix +++ b/modules/wireshark.nix @@ -2,4 +2,6 @@ { programs.wireshark.enable = true; programs.wireshark.package = pkgs.wireshark; + + users.users.${config.mainUser.name}.extraGroups = [ "wireshark" ]; } diff --git a/users/kopatz/default.nix b/users/kopatz/default.nix index 529e42e..b49e1d3 100644 --- a/users/kopatz/default.nix +++ b/users/kopatz/default.nix @@ -17,7 +17,7 @@ isNormalUser = true; description = config.mainUser.name; shell = pkgs.zsh; - extraGroups = [ "networkmanager" "wheel" "docker" "libvirtd" ]; + extraGroups = [ "networkmanager" "wheel" "docker" ]; packages = with pkgs; [ (discord.override { withVencord = true; }) librewolf