Add lxd module
This commit is contained in:
parent
434498fdc1
commit
d39c1fdb49
1 changed files with 23 additions and 0 deletions
23
modules/lxd/default.nix
Normal file
23
modules/lxd/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ 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" ];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue