24 lines
432 B
Nix
24 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" ];
|
||
|
};
|
||
|
}
|