nixos-config/modules/lxd/default.nix

24 lines
432 B
Nix
Raw Normal View History

2023-02-28 13:21:51 +01:00
{ config, lib, ... }:
with lib;
let
cfg = config.eboskma.lxd;
vars = config.eboskma.var;
in
{
options.eboskma.lxd = { enable = mkEnableOption "lxd"; };
config = mkIf cfg.enable {
virtualisation.lxd = {
enable = true;
recommendedSysctlSettings = true;
};
virtualisation.lxc = {
enable = true;
lxcfs.enable = true;
};
users.users.${vars.mainUser}.extraGroups = [ "lxd" ];
};
}