Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
TheButlah committed Nov 30, 2024
1 parent 2a4e9a4 commit c858450
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 6 deletions.
8 changes: 4 additions & 4 deletions identity-server/identity-server.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Requires=docker.service
[Service]
TimeoutStartSec=0
Restart=always
ExecStartPre=-/usr/bin/docker stop %n
ExecStartPre=-/usr/bin/docker rm %n
ExecStartPre=/usr/bin/docker pull ghcr.io/nexussocial/identity-server:latest
ExecStart=/usr/bin/docker run --rm --name %n identity-server
ExecStartPre=-/usr/bin/env docker stop %n
ExecStartPre=-/usr/bin/env docker rm %n
ExecStartPre=/usr/bin/env docker pull ghcr.io/nexussocial/identity-server:latest
ExecStart=/usr/bin/env docker run --rm --name %n identity-server

[Install]
WantedBy=multi-user.target
29 changes: 29 additions & 0 deletions nix/nixos/identityServerSystemd.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{ inputs
, hostname
, username
, lib
, config
, pkgs
, ...
}: {
# You can import other NixOS modules here
imports = [ ];

systemd.services.identity-server = {
description = "NexusSocial Identity Server";
after = [ "docker.service" ];
requires = [ "docker.service" ];
serviceConfig = {
TimeoutStartSec = 0;
Restart = "always";
ExecStartPre = [
"-/usr/bin/env docker stop %n"
"-/usr/bin/env docker rm %n"
"-/usr/bin/env docker pull ghcr.io/nexussocial/identity-server:latest"
];
ExecStart = "/usr/bin/env docker run --rm --name %n identity-server";
};
wantedBy = [ "multi-user.target" ];
};

}
4 changes: 2 additions & 2 deletions nix/nixos/servers-us-east-1/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
, ...
}: {
# You can import other NixOS modules here
imports = [ ];
imports = [ ../identityServerSystemd.nix ];

# BEGIN Recommendations from the linode article
boot.loader.grub.forceInstall = true;
Expand Down Expand Up @@ -100,6 +100,7 @@
};
};

virtualisation.podman.enable = true;

environment.systemPackages = with pkgs; [
neovim
Expand All @@ -109,7 +110,6 @@
inetutils
mtr
sysstat

];

# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
Expand Down

0 comments on commit c858450

Please sign in to comment.