diff --git a/nixos/common/services/podman.nix b/nixos/common/services/podman.nix index 4e767f4b..7c3919c0 100644 --- a/nixos/common/services/podman.nix +++ b/nixos/common/services/podman.nix @@ -23,4 +23,8 @@ podman-tui inputs.compose2nix.packages.${system}.default ]; + + # Add the docker telegraf listener + services.telegraf.extraConfig.inputs.podman = {}; + users.users.telegraf.extraGroups = [ "docker" ]; } diff --git a/nixos/hosts/osaka-linode-01/default.nix b/nixos/hosts/osaka-linode-01/default.nix index 6362760a..02e2d3c0 100644 --- a/nixos/hosts/osaka-linode-01/default.nix +++ b/nixos/hosts/osaka-linode-01/default.nix @@ -1,10 +1,11 @@ -{ config, lib, pkgs, modulesPath, hostname, username, ... }: { +{ lib, modulesPath, ... }: { imports = [ (modulesPath + "/profiles/qemu-guest.nix") ../../common/services/tailscale-autoconnect.nix + ../../common/services/podman.nix ./firewall.nix ./wireguard.nix - ./podman.nix + ./podman/derp.nix ]; boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ]; diff --git a/nixos/hosts/osaka-linode-01/podman.nix b/nixos/hosts/osaka-linode-01/podman.nix deleted file mode 100644 index c8ef2156..00000000 --- a/nixos/hosts/osaka-linode-01/podman.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ lib, pkgs, ... }: { - - # Runtime - virtualisation.podman = { - enable = true; - autoPrune.enable = true; - dockerCompat = true; - defaultNetwork.settings = { - # Required for container networking to be able to use names. - dns_enabled = true; - }; - }; - virtualisation.oci-containers.backend = "podman"; - - # Containers - imports = [ - ./podman/derp.nix - ]; - - environment.systemPackages = [ pkgs.ctop ]; - - # Add the docker telegraf listener - services.telegraf.extraConfig.inputs.docker = {}; - users.users.telegraf.extraGroups = [ "docker" ]; -} diff --git a/nixos/hosts/piaware-rpi4/default.nix b/nixos/hosts/piaware-rpi4/default.nix index f3f55246..5c2cdc97 100644 --- a/nixos/hosts/piaware-rpi4/default.nix +++ b/nixos/hosts/piaware-rpi4/default.nix @@ -1,9 +1,10 @@ -{ inputs, config, lib, pkgs, modulesPath, hostname, ... }: { +{ lib, pkgs, modulesPath, ... }: { imports = [ # inputs.nixos-hardware.nixosModules.raspberry-pi-4 (modulesPath + "/installer/scan/not-detected.nix") ../../common/services/tailscale-autoconnect.nix - ./podman.nix + ../../common/services/podman.nix + ./podman/piaware.nix ]; # Enable distributed Builds nix.distributedBuilds = true; @@ -56,4 +57,4 @@ services.tailscale.extraUpFlags = [ "--advertise-exit-node" ]; boot.kernel.sysctl = { "net.ipv4.ip_forward" = true; }; -} \ No newline at end of file +} diff --git a/nixos/hosts/piaware-rpi4/podman.nix b/nixos/hosts/piaware-rpi4/podman.nix deleted file mode 100644 index 2bc5554c..00000000 --- a/nixos/hosts/piaware-rpi4/podman.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ lib, pkgs, ... }: { - - # Runtime - virtualisation.podman = { - enable = true; - autoPrune.enable = true; - dockerCompat = true; - defaultNetwork.settings = { - # Required for container networking to be able to use names. - dns_enabled = true; - }; - }; - virtualisation.oci-containers.backend = "podman"; - - # Containers - imports = [ - ./podman/piaware.nix - ]; - - environment.systemPackages = [ pkgs.ctop ]; - - # Add the docker telegraf listener - services.telegraf.extraConfig.inputs.docker = {}; - users.users.telegraf.extraGroups = [ "docker" ]; -}