nixos-config/modules/lxd/default.nix

26 lines
438 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
{
2024-02-05 11:46:52 +01:00
options.eboskma.lxd = {
enable = mkEnableOption "lxd";
};
2023-02-28 13:21:51 +01:00
config = mkIf cfg.enable {
virtualisation.lxd = {
enable = true;
recommendedSysctlSettings = true;
};
virtualisation.lxc = {
enable = true;
lxcfs.enable = true;
};
users.users.${vars.mainUser}.extraGroups = [ "lxd" ];
};
}