From 6d41b7dea9938aae4ca442be4842fb6c4a4719ce Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 29 Jun 2024 22:18:42 +0100 Subject: [PATCH] changed fs of lxc to btrfs --- hosts/common/disks/zfs/zspeed.nix | 10 ---------- hosts/common/optional/lxd/lxd-networking.nix | 2 +- hosts/common/optional/lxd/lxd-preseed.nix | 6 ++---- hosts/common/optional/lxd/profiles/default.nix | 17 ++++++++++++----- 4 files changed, 15 insertions(+), 20 deletions(-) diff --git a/hosts/common/disks/zfs/zspeed.nix b/hosts/common/disks/zfs/zspeed.nix index 08587e3..006ad7b 100644 --- a/hosts/common/disks/zfs/zspeed.nix +++ b/hosts/common/disks/zfs/zspeed.nix @@ -57,11 +57,6 @@ "com.sun:auto-snapshot:daily" = "true"; "volblocksize" = "8k"; }; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/postgres"; - }; }; test = { type = "zfs_volume"; @@ -70,11 +65,6 @@ "com.sun:auto-snapshot:daily" = "true"; "volblocksize" = "8k"; }; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/test"; - }; }; }; }; diff --git a/hosts/common/optional/lxd/lxd-networking.nix b/hosts/common/optional/lxd/lxd-networking.nix index e22a18a..23aa2e4 100644 --- a/hosts/common/optional/lxd/lxd-networking.nix +++ b/hosts/common/optional/lxd/lxd-networking.nix @@ -16,6 +16,6 @@ in # allow static ipv4 for containers networking.firewall.extraCommands = '' - iptables -a input -i ${lxd_profiles.default.network.name} -m comment --comment "lxd rule for ${lxd_profiles.default.network.name}" -j accept + iptables -A INPUT -i ${lxd_profiles.default.network.name} -m comment --comment "lxd rule for ${lxd_profiles.default.network.name}" -j ACCEPT ''; } diff --git a/hosts/common/optional/lxd/lxd-preseed.nix b/hosts/common/optional/lxd/lxd-preseed.nix index 3b971de..756ee70 100644 --- a/hosts/common/optional/lxd/lxd-preseed.nix +++ b/hosts/common/optional/lxd/lxd-preseed.nix @@ -8,7 +8,7 @@ in { virtualisation = { lxd = { - preseed = { + preseed = { networks = [ lxd_profiles.default.network ]; @@ -17,9 +17,7 @@ in lxd_profiles.default.profile ]; - storage_pools = [ - lxd_profiles.default.storage_pool - ]; + storage_pools = lxd_profiles.default.storage_pools; }; }; }; diff --git a/hosts/common/optional/lxd/profiles/default.nix b/hosts/common/optional/lxd/profiles/default.nix index 87fd741..fccbef5 100644 --- a/hosts/common/optional/lxd/profiles/default.nix +++ b/hosts/common/optional/lxd/profiles/default.nix @@ -9,11 +9,18 @@ }; }; - storage_pool = { - name = "postgres"; - driver = "disk"; - config.source = "/mnt/postgres"; - }; + storage_pools = [ + { + name = "postgres"; + driver = "btrfs"; + config.source = "/dev/zd0"; + } + { + name = "test"; + driver = "btrfs"; + config.source = "/dev/zd16"; + } + ]; profile = { name = "default";