Compare commits

..

No commits in common. "216f1bd706579cc237c6210e9410031eb223f91b" and "9f593876ab0e67643ba4f1e9eb1c497612aa0b0b" have entirely different histories.

7 changed files with 5 additions and 147 deletions

View File

@ -1,38 +0,0 @@
architecture: x86_64
config:
boot.autostart: "true"
image.architecture: amd64
image.description: Nixos unstable amd64 (20240630_01:00)
image.os: Nixos
image.release: unstable
image.requirements.secureboot: "false"
image.serial: "20240630_01:00"
image.type: squashfs
image.variant: default
security.nesting: "true"
volatile.base_image: bbd293f2d08dfe82b4d81f28aeb3f1f7fef829f717e3073423c59fd6a7794749
volatile.cloud-init.instance-id: 90575adf-c804-483b-bb95-a188cdc47101
volatile.eth0.host_name: veth79bf6370
volatile.eth0.hwaddr: 00:16:3e:17:c1:da
volatile.idmap.base: "0"
volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.idmap.next: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.last_state.idmap: '[]'
volatile.last_state.power: RUNNING
volatile.uuid: 62db570b-8c46-4199-8657-1c387f6fddba
volatile.uuid.generation: 62db570b-8c46-4199-8657-1c387f6fddba
devices:
eth0:
name: eth0
nictype: bridged
parent: lxdBrDefault
type: nic
root:
path: /
pool: test
type: disk
ephemeral: false
profiles:
- default
stateful: false
description: ""

View File

@ -58,7 +58,7 @@
"volblocksize" = "8k";
};
};
lxc = {
test = {
type = "zfs_volume";
size = "10G -s";
options = {

View File

@ -4,7 +4,6 @@
./lxd-preseed.nix
];
networking.nftables.enable = true;
networking.firewall.enable = false;
virtualisation = {
incus = {
package = pkgs.incus;

View File

@ -2,7 +2,6 @@
let
lxd_profiles = {
"postgres" = (import ./profiles/postgres.nix);
"default" = (import ./profiles/default.nix);
};
in
@ -18,17 +17,13 @@ in
networks = [
lxd_profiles.default.network
lxd_profiles.postgres.network
];
profiles = [
lxd_profiles.default.profile
lxd_profiles.postgres.profile
];
storage_pools =
lxd_profiles.default.storage_pools ++
lxd_profiles.postgres.storage_pools;
storage_pools = lxd_profiles.default.storage_pools;
};
};
};

View File

@ -4,7 +4,7 @@
type = "bridge";
config = {
"ipv4.address" = "10.100.2.1/8";
"ipv4.address" = "10.100.1.1/8";
"ipv4.nat" = "true";
"ipv4.firewall" = "false";
};
@ -17,9 +17,9 @@
config.source = "/dev/zvol/zspeed/postgres";
}
{
name = "lxc";
name = "test";
driver = "btrfs";
config.source = "/dev/zvol/zspeed/lxc";
config.source = "/dev/zvol/zspeed/test";
}
];

View File

@ -1,49 +0,0 @@
{
network = {
name = "lxdBrPsql";
type = "bridge";
config = {
"ipv4.address" = "10.100.1.1/8";
"ipv4.nat" = "true";
"ipv4.firewall" = "false";
};
};
storage_pools = [
{
name = "postgres";
driver = "btrfs";
config.source = "/dev/zvol/zspeed/postgres";
}
{
name = "lxc";
driver = "btrfs";
config.source = "/dev/zvol/zspeed/lxc";
}
];
profile = {
name = "postgres";
devices = {
"eth0" = {
name = "eth0";
nictype = "bridged";
parent = "lxdBrPsql";
type = "nic";
};
"root" = {
path = "/";
pool = "default";
size = "8GiB";
type = "disk";
};
"db" = {
path = "/var/lib/postgresql/16/";
pool = "postgres";
source = "db";
type = "disk";
};
};
};
}

View File

@ -1,49 +0,0 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, lib, modulesPath, ... }:
{
imports =
[
# Include the default lxd configuration.
"${modulesPath}/virtualisation/lxc-container.nix"
# Include the container-specific autogenerated configuration.
./lxd.nix
];
networking = {
dhcpcd.enable = false;
useDHCP = false;
useHostResolvConf = false;
};
systemd.network = {
enable = true;
networks."50-eth0" = {
matchConfig.Name = "eth0";
networkConfig = {
DHCP = "ipv4";
IPv6AcceptRA = true;
};
linkConfig.RequiredForOnline = "routable";
};
};
environment.systemPackages = [
pkgs.vim
];
services.postgresql = {
enable = true;
package = pkgs.postgresql_16;
ensureDatabases = [ "default" ];
authentication = pkgs.lib.mkOverride 10 ''
#type database DBuser auth-method
local all all trust
'';
};
system.stateVersion = "24.11"; # Did you read the comment?
}