Testing docker

This commit is contained in:
albert 2024-03-22 12:29:28 +09:00
parent 762035ab3e
commit bc834358f5
No known key found for this signature in database
GPG key ID: 64F6C4EB46C4543A
7 changed files with 30 additions and 30 deletions

View file

@ -26,5 +26,6 @@
papirus-nord
xfce.xfwm4-themes
xfce4-docklike-plugin
dconf2nix # https://github.com/gvolpe/dconf2nix
];
}

View file

@ -6,6 +6,6 @@ in {
# Set up the bridge network:
containers = {
rdesktop = libx.mkContainer { hostname = "rdesktop"; desktop = "plasma6"; unfree = true; };
rdesktop = libx.mkContainer { hostname = "rdesktop"; desktop = "xfce"; unfree = true; };
};
}

View file

@ -21,7 +21,6 @@
];
allowedUDPPorts = [
53 # DNS (udp)
3478 # Headscale DERP (udp)
10000 # Jitsi Meet (udp)
];
};

View file

@ -31,35 +31,35 @@
"--network=headscale-default"
];
};
systemd.services."podman-headscale-derp" = {
systemd.services."docker-headscale-derp" = {
serviceConfig = {
Restart = lib.mkOverride 500 "always";
};
after = [ "podman-network-headscale-default.service" ];
requires = [ "podman-network-headscale-default.service" ];
partOf = [ "podman-compose-headscale-root.target" ];
wantedBy = [ "podman-compose-headscale-root.target" ];
after = [ "docker-network-headscale-default.service" ];
requires = [ "docker-network-headscale-default.service" ];
partOf = [ "docker-compose-headscale-root.target" ];
wantedBy = [ "docker-compose-headscale-root.target" ];
};
# Networks
systemd.services."podman-network-headscale-default" = {
path = [ pkgs.podman ];
systemd.services."docker-network-headscale-default" = {
path = [ pkgs.docker ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStop = "${pkgs.podman}/bin/podman network rm -f headscale-default";
ExecStop = "${pkgs.docker}/bin/docker network rm -f headscale-default";
};
script = ''
podman network inspect headscale-default || podman network create headscale-default --opt isolate=true
docker network inspect headscale-default || docker network create headscale-default --opt isolate=true
'';
partOf = [ "podman-compose-headscale-root.target" ];
wantedBy = [ "podman-compose-headscale-root.target" ];
partOf = [ "docker-compose-headscale-root.target" ];
wantedBy = [ "docker-compose-headscale-root.target" ];
};
# Root service
# When started, this will automatically create all resources and start
# the containers. When stopped, this will teardown all resources.
systemd.targets."podman-compose-headscale-root" = {
systemd.targets."docker-compose-headscale-root" = {
unitConfig = {
Description = "Root target generated by compose2nix.";
};

View file

@ -2,9 +2,9 @@
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
../../common/services/tailscale-autoconnect.nix
../../common/services/podman.nix
../../common/services/docker.nix
./firewall.nix
./podman/derp.nix
./containers/derp.nix
];
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ];

View file

@ -32,43 +32,43 @@
"--network=headscale-default"
];
};
systemd.services."podman-headscale-derp" = {
systemd.services."docker-headscale-derp" = {
serviceConfig = {
Restart = lib.mkOverride 500 "always";
};
after = [
"podman-network-headscale-default.service"
"docker-network-headscale-default.service"
];
requires = [
"podman-network-headscale-default.service"
"docker-network-headscale-default.service"
];
partOf = [
"podman-compose-headscale-root.target"
"docker-compose-headscale-root.target"
];
wantedBy = [
"podman-compose-headscale-root.target"
"docker-compose-headscale-root.target"
];
};
# Networks
systemd.services."podman-network-headscale-default" = {
path = [ pkgs.podman ];
systemd.services."docker-network-headscale-default" = {
path = [ pkgs.docker ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStop = "${pkgs.podman}/bin/podman network rm -f headscale-default";
ExecStop = "${pkgs.docker}/bin/docker network rm -f headscale-default";
};
script = ''
podman network inspect headscale-default || podman network create headscale-default --opt isolate=true
docker network inspect headscale-default || docker network create headscale-default --opt isolate=true
'';
partOf = [ "podman-compose-headscale-root.target" ];
wantedBy = [ "podman-compose-headscale-root.target" ];
partOf = [ "docker-compose-headscale-root.target" ];
wantedBy = [ "docker-compose-headscale-root.target" ];
};
# Root service
# When started, this will automatically create all resources and start
# the containers. When stopped, this will teardown all resources.
systemd.targets."podman-compose-headscale-root" = {
systemd.targets."docker-compose-headscale-root" = {
unitConfig = {
Description = "Root target generated by compose2nix.";
};

View file

@ -2,10 +2,10 @@
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
../../common/services/tailscale-autoconnect.nix
../../common/services/podman.nix
../../common/services/docker.nix
./firewall.nix
./wireguard.nix
./podman/derp.nix
./containers/derp.nix
];
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ];