Hi Mark,

Have you tried this ?


```nix
{ config, pkgs, ... }:
{
  virtualisation.libvirtd.enable = true;
  users.users.myuser.extraGroups = [ "libvirtd" ];
}
```

This should seamlessly integrate with other options. By default lists will be concatenated, not overwritten.

-- Layus.

On 24/04/17 18:21, Mark Gardner wrote:
I separated my configuration into different files by functionality. The goal is to keep like things together and import them as needed to create the final configuration.nix.

My virtualization.nix currently contains:

{ config, pkgs, ... }:
let
  groups = config.users.users.
​myuser>.
extraGroups;
in
{
  virtualisation = {
    libvirtd.enable = true;
  };
  users.users.
​myuser
.extraGroups = groups ++ [ "libvirtd" ];
}

​ but nixos-rebuild gives "​infinite recursion encountered". How do I set things up so that myuser's group membership will include not only what is defined in extraGroup somewhere else but also "libvirtd"?

Mark
--
Mark Gardner
--

_______________________________________________
nix-dev mailing list
[email protected]
https://mailman.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to