Skip to content

Commit

Permalink
feat(hosts): proper lxd support
Browse files Browse the repository at this point in the history
  • Loading branch information
Misterio77 committed Sep 30, 2024
1 parent 5c3af31 commit caa9fee
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 14 deletions.
1 change: 1 addition & 0 deletions hosts/atlas/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
../common/optional/pipewire.nix
../common/optional/quietboot.nix
../common/optional/wireless.nix
../common/optional/lxd.nix

../common/optional/starcitizen-fixes.nix
];
Expand Down
12 changes: 0 additions & 12 deletions hosts/common/optional/lxc.nix

This file was deleted.

46 changes: 46 additions & 0 deletions hosts/common/optional/lxd.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
virtualisation.lxd = {
enable = true;
preseed = {
networks = [
{
name = "lxdbr0";
type = "bridge";
config = {
"ipv4.address" = "10.0.100.1/24";
"ipv4.nat" = "true";
};
}
];
storage_pools = [
{
name = "default";
driver = "dir";
config.source = "/var/lib/lxd/storage-pools/default";
}
];
profiles = [
{
name = "default";
config = {
"security.privileged" = "true";
};
devices = {
eth0 = {
name = "eth0";
network = "lxdbr0";
type = "nic";
};
root = {
path = "/";
pool = "default";
type = "disk";
};
};
}
];
};
};
# https://github.com/NixOS/nixpkgs/issues/263359
networking.firewall.trustedInterfaces = ["lxdbr0"];
}
2 changes: 0 additions & 2 deletions hosts/pleione/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

../common/optional/tlp.nix
../common/optional/wireless.nix

../common/optional/lxc.nix
];

networking = {
Expand Down

0 comments on commit caa9fee

Please sign in to comment.