Skip to content

Commit

Permalink
feat(profiles): use lxd for virtual machines (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunziping2016 authored Sep 23, 2024
1 parent 029c6b3 commit f3cf522
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions flake/hosts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ let
services.printing
system.boot.efi
users.sun
virtualisation.lxd
virtualisation.podman
];
};
Expand Down
19 changes: 19 additions & 0 deletions nixos/profiles/virtualisation/lxd.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
virtualisation.lxd.enable = true;
virtualisation.lxd.recommendedSysctlSettings = true;
virtualisation.lxd.ui.enable = true;

users.users.sun.extraGroups = [ "lxd" ];

systemd.network.networks."10-lxdbr0" = {
name = "lxdbr0";
linkConfig = {
ActivationPolicy = "manual";
};
networkConfig = {
DNS = "10.212.4.1";
Domains = "~lxd";
KeepConfiguration = true;
};
};
}

0 comments on commit f3cf522

Please sign in to comment.