nixos-config/modules/lxd/default.nix
2023-02-28 13:21:51 +01:00

23 lines
432 B
Nix

{ 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" ];
};
}