update spacebar
This commit is contained in:
parent
77ed9487a2
commit
8e45e7ddb2
2 changed files with 8 additions and 74 deletions
|
@ -5,6 +5,7 @@
|
||||||
noshell.url = "github:viperML/noshell";
|
noshell.url = "github:viperML/noshell";
|
||||||
elmskell-blog.url = "git+file:///var/lib/git-server/blog.git";
|
elmskell-blog.url = "git+file:///var/lib/git-server/blog.git";
|
||||||
spacebar-server.url = "github:spacebarchat/server";
|
spacebar-server.url = "github:spacebarchat/server";
|
||||||
|
jank-client.url = "git+file:///var/lib/git-server/jank-client-fork.git";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
|
@ -13,6 +14,7 @@
|
||||||
noshell,
|
noshell,
|
||||||
elmskell-blog,
|
elmskell-blog,
|
||||||
spacebar-server,
|
spacebar-server,
|
||||||
|
jank-client,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
@ -38,6 +40,12 @@
|
||||||
noshell.nixosModules.default
|
noshell.nixosModules.default
|
||||||
{programs.noshell.enable = true;}
|
{programs.noshell.enable = true;}
|
||||||
|
|
||||||
|
jank-client.nixosModules.x86_64-linux.default
|
||||||
|
{
|
||||||
|
services.jank-client.enable = true;
|
||||||
|
services.jank-client.port = 8282;
|
||||||
|
}
|
||||||
|
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -62,78 +62,4 @@ in {
|
||||||
openssh.authorizedKeys.keys = ssh-pub-keys;
|
openssh.authorizedKeys.keys = ssh-pub-keys;
|
||||||
};
|
};
|
||||||
users.groups.spacebar = {};
|
users.groups.spacebar = {};
|
||||||
|
|
||||||
# Enable container name DNS for non-default Docker networks.
|
|
||||||
# https://github.com/NixOS/nixpkgs/issues/226365
|
|
||||||
networking.firewall.interfaces."docker+".allowedUDPPorts = [53];
|
|
||||||
|
|
||||||
virtualisation.oci-containers.backend = "docker";
|
|
||||||
|
|
||||||
# Containers
|
|
||||||
virtualisation.oci-containers.containers."spaceclient-jank" = {
|
|
||||||
image = "docker.io/compose2nix/spaceclient-jank";
|
|
||||||
ports = [
|
|
||||||
"8282:8080/tcp"
|
|
||||||
];
|
|
||||||
log-driver = "journald";
|
|
||||||
extraOptions = [
|
|
||||||
"--network-alias=jank"
|
|
||||||
"--network=spaceclient_default"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
systemd.services."docker-spaceclient-jank" = {
|
|
||||||
serviceConfig = {
|
|
||||||
Restart = lib.mkOverride 90 "always";
|
|
||||||
};
|
|
||||||
after = [
|
|
||||||
"docker-network-spaceclient_default.service"
|
|
||||||
];
|
|
||||||
requires = [
|
|
||||||
"docker-network-spaceclient_default.service"
|
|
||||||
];
|
|
||||||
partOf = [
|
|
||||||
"docker-compose-spaceclient-root.target"
|
|
||||||
];
|
|
||||||
wantedBy = [
|
|
||||||
"docker-compose-spaceclient-root.target"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Networks
|
|
||||||
systemd.services."docker-network-spaceclient_default" = {
|
|
||||||
path = [pkgs.docker];
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
RemainAfterExit = true;
|
|
||||||
ExecStop = "docker network rm -f spaceclient_default";
|
|
||||||
};
|
|
||||||
script = ''
|
|
||||||
docker network inspect spaceclient_default || docker network create spaceclient_default
|
|
||||||
'';
|
|
||||||
partOf = ["docker-compose-spaceclient-root.target"];
|
|
||||||
wantedBy = ["docker-compose-spaceclient-root.target"];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Builds
|
|
||||||
systemd.services."docker-build-spaceclient-jank" = {
|
|
||||||
path = [pkgs.docker pkgs.git];
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
TimeoutSec = 300;
|
|
||||||
};
|
|
||||||
script = ''
|
|
||||||
cd /home/mtgmonkey/spaceclient
|
|
||||||
docker build -t compose2nix/spaceclient-jank .
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Root service
|
|
||||||
# When started, this will automatically create all resources and start
|
|
||||||
# the containers. When stopped, this will teardown all resources.
|
|
||||||
systemd.targets."docker-compose-spaceclient-root" = {
|
|
||||||
unitConfig = {
|
|
||||||
Description = "Root target generated by compose2nix.";
|
|
||||||
};
|
|
||||||
wantedBy = ["multi-user.target"];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue