Skip to content

Commit caa9fee

Browse files
committed
feat(hosts): proper lxd support
1 parent 5c3af31 commit caa9fee

File tree

4 files changed

+47
-14
lines changed

4 files changed

+47
-14
lines changed

hosts/atlas/default.nix

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
../common/optional/pipewire.nix
1919
../common/optional/quietboot.nix
2020
../common/optional/wireless.nix
21+
../common/optional/lxd.nix
2122

2223
../common/optional/starcitizen-fixes.nix
2324
];

hosts/common/optional/lxc.nix

-12
This file was deleted.

hosts/common/optional/lxd.nix

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
virtualisation.lxd = {
3+
enable = true;
4+
preseed = {
5+
networks = [
6+
{
7+
name = "lxdbr0";
8+
type = "bridge";
9+
config = {
10+
"ipv4.address" = "10.0.100.1/24";
11+
"ipv4.nat" = "true";
12+
};
13+
}
14+
];
15+
storage_pools = [
16+
{
17+
name = "default";
18+
driver = "dir";
19+
config.source = "/var/lib/lxd/storage-pools/default";
20+
}
21+
];
22+
profiles = [
23+
{
24+
name = "default";
25+
config = {
26+
"security.privileged" = "true";
27+
};
28+
devices = {
29+
eth0 = {
30+
name = "eth0";
31+
network = "lxdbr0";
32+
type = "nic";
33+
};
34+
root = {
35+
path = "/";
36+
pool = "default";
37+
type = "disk";
38+
};
39+
};
40+
}
41+
];
42+
};
43+
};
44+
# https://github.com/NixOS/nixpkgs/issues/263359
45+
networking.firewall.trustedInterfaces = ["lxdbr0"];
46+
}

hosts/pleione/default.nix

-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020

2121
../common/optional/tlp.nix
2222
../common/optional/wireless.nix
23-
24-
../common/optional/lxc.nix
2523
];
2624

2725
networking = {

0 commit comments

Comments
 (0)