fixup/redis mem (#90)

* add sysctl params

* Fix early startup issue w/ autopull

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>

* Update flake.lock

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>

* add dependency for autopull

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>

* move autopull dependency

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>

* nix environment is weird :(

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>

---------

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
2024-02-18 00:27:02 -05:00
committed by GitHub
parent b2366d9a44
commit 889ce92247
2 changed files with 7 additions and 3 deletions

View File

@ -40,14 +40,14 @@ in {
config = lib.mkIf (cfg.enable && !(builtins.isNull cfg.path)) {
environment.systemPackages = [ pkgs.openssh pkgs.git ];
systemd.services."autopull@${cfg.name}" = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
after = [ "multi-user.target" ];
requires = [ "multi-user.target" ];
description = "Pull the latest data for ${cfg.name}";
environment = lib.mkIf (cfg.ssh-key != "") { GIT_SSH_COMMAND="${pkgs.openssh}/bin/ssh -i ${cfg.ssh-key} -o IdentitiesOnly=yes";};
serviceConfig = {
Type = "oneshot";
User = "root";
WorkingDirectory = cfg.path;
Environment = lib.mkIf (cfg.ssh-key != "") "GIT_SSH_COMMAND=${pkgs.openssh}/bin/ssh -i ${cfg.ssh-key} -o IdentitiesOnly=yes";
ExecStart = "${pkgs.git}/bin/git pull --all";
};
};