Testing docker
This commit is contained in:
parent
762035ab3e
commit
bc834358f5
7 changed files with 30 additions and 30 deletions
|
@ -26,5 +26,6 @@
|
||||||
papirus-nord
|
papirus-nord
|
||||||
xfce.xfwm4-themes
|
xfce.xfwm4-themes
|
||||||
xfce4-docklike-plugin
|
xfce4-docklike-plugin
|
||||||
|
dconf2nix # https://github.com/gvolpe/dconf2nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,6 @@ in {
|
||||||
|
|
||||||
# Set up the bridge network:
|
# Set up the bridge network:
|
||||||
containers = {
|
containers = {
|
||||||
rdesktop = libx.mkContainer { hostname = "rdesktop"; desktop = "plasma6"; unfree = true; };
|
rdesktop = libx.mkContainer { hostname = "rdesktop"; desktop = "xfce"; unfree = true; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
];
|
];
|
||||||
allowedUDPPorts = [
|
allowedUDPPorts = [
|
||||||
53 # DNS (udp)
|
53 # DNS (udp)
|
||||||
3478 # Headscale DERP (udp)
|
|
||||||
10000 # Jitsi Meet (udp)
|
10000 # Jitsi Meet (udp)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -31,35 +31,35 @@
|
||||||
"--network=headscale-default"
|
"--network=headscale-default"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
systemd.services."podman-headscale-derp" = {
|
systemd.services."docker-headscale-derp" = {
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Restart = lib.mkOverride 500 "always";
|
Restart = lib.mkOverride 500 "always";
|
||||||
};
|
};
|
||||||
after = [ "podman-network-headscale-default.service" ];
|
after = [ "docker-network-headscale-default.service" ];
|
||||||
requires = [ "podman-network-headscale-default.service" ];
|
requires = [ "docker-network-headscale-default.service" ];
|
||||||
partOf = [ "podman-compose-headscale-root.target" ];
|
partOf = [ "docker-compose-headscale-root.target" ];
|
||||||
wantedBy = [ "podman-compose-headscale-root.target" ];
|
wantedBy = [ "docker-compose-headscale-root.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Networks
|
# Networks
|
||||||
systemd.services."podman-network-headscale-default" = {
|
systemd.services."docker-network-headscale-default" = {
|
||||||
path = [ pkgs.podman ];
|
path = [ pkgs.docker ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
RemainAfterExit = true;
|
RemainAfterExit = true;
|
||||||
ExecStop = "${pkgs.podman}/bin/podman network rm -f headscale-default";
|
ExecStop = "${pkgs.docker}/bin/docker network rm -f headscale-default";
|
||||||
};
|
};
|
||||||
script = ''
|
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" ];
|
partOf = [ "docker-compose-headscale-root.target" ];
|
||||||
wantedBy = [ "podman-compose-headscale-root.target" ];
|
wantedBy = [ "docker-compose-headscale-root.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Root service
|
# Root service
|
||||||
# When started, this will automatically create all resources and start
|
# When started, this will automatically create all resources and start
|
||||||
# the containers. When stopped, this will teardown all resources.
|
# the containers. When stopped, this will teardown all resources.
|
||||||
systemd.targets."podman-compose-headscale-root" = {
|
systemd.targets."docker-compose-headscale-root" = {
|
||||||
unitConfig = {
|
unitConfig = {
|
||||||
Description = "Root target generated by compose2nix.";
|
Description = "Root target generated by compose2nix.";
|
||||||
};
|
};
|
|
@ -2,9 +2,9 @@
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
../../common/services/tailscale-autoconnect.nix
|
../../common/services/tailscale-autoconnect.nix
|
||||||
../../common/services/podman.nix
|
../../common/services/docker.nix
|
||||||
./firewall.nix
|
./firewall.nix
|
||||||
./podman/derp.nix
|
./containers/derp.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ];
|
||||||
|
|
|
@ -32,43 +32,43 @@
|
||||||
"--network=headscale-default"
|
"--network=headscale-default"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
systemd.services."podman-headscale-derp" = {
|
systemd.services."docker-headscale-derp" = {
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Restart = lib.mkOverride 500 "always";
|
Restart = lib.mkOverride 500 "always";
|
||||||
};
|
};
|
||||||
after = [
|
after = [
|
||||||
"podman-network-headscale-default.service"
|
"docker-network-headscale-default.service"
|
||||||
];
|
];
|
||||||
requires = [
|
requires = [
|
||||||
"podman-network-headscale-default.service"
|
"docker-network-headscale-default.service"
|
||||||
];
|
];
|
||||||
partOf = [
|
partOf = [
|
||||||
"podman-compose-headscale-root.target"
|
"docker-compose-headscale-root.target"
|
||||||
];
|
];
|
||||||
wantedBy = [
|
wantedBy = [
|
||||||
"podman-compose-headscale-root.target"
|
"docker-compose-headscale-root.target"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Networks
|
# Networks
|
||||||
systemd.services."podman-network-headscale-default" = {
|
systemd.services."docker-network-headscale-default" = {
|
||||||
path = [ pkgs.podman ];
|
path = [ pkgs.docker ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
RemainAfterExit = true;
|
RemainAfterExit = true;
|
||||||
ExecStop = "${pkgs.podman}/bin/podman network rm -f headscale-default";
|
ExecStop = "${pkgs.docker}/bin/docker network rm -f headscale-default";
|
||||||
};
|
};
|
||||||
script = ''
|
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" ];
|
partOf = [ "docker-compose-headscale-root.target" ];
|
||||||
wantedBy = [ "podman-compose-headscale-root.target" ];
|
wantedBy = [ "docker-compose-headscale-root.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Root service
|
# Root service
|
||||||
# When started, this will automatically create all resources and start
|
# When started, this will automatically create all resources and start
|
||||||
# the containers. When stopped, this will teardown all resources.
|
# the containers. When stopped, this will teardown all resources.
|
||||||
systemd.targets."podman-compose-headscale-root" = {
|
systemd.targets."docker-compose-headscale-root" = {
|
||||||
unitConfig = {
|
unitConfig = {
|
||||||
Description = "Root target generated by compose2nix.";
|
Description = "Root target generated by compose2nix.";
|
||||||
};
|
};
|
|
@ -2,10 +2,10 @@
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
../../common/services/tailscale-autoconnect.nix
|
../../common/services/tailscale-autoconnect.nix
|
||||||
../../common/services/podman.nix
|
../../common/services/docker.nix
|
||||||
./firewall.nix
|
./firewall.nix
|
||||||
./wireguard.nix
|
./wireguard.nix
|
||||||
./podman/derp.nix
|
./containers/derp.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ];
|
||||||
|
|
Loading…
Reference in a new issue