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:
parent
b2366d9a44
commit
889ce92247
@ -40,14 +40,14 @@ in {
|
|||||||
config = lib.mkIf (cfg.enable && !(builtins.isNull cfg.path)) {
|
config = lib.mkIf (cfg.enable && !(builtins.isNull cfg.path)) {
|
||||||
environment.systemPackages = [ pkgs.openssh pkgs.git ];
|
environment.systemPackages = [ pkgs.openssh pkgs.git ];
|
||||||
systemd.services."autopull@${cfg.name}" = {
|
systemd.services."autopull@${cfg.name}" = {
|
||||||
wantedBy = [ "multi-user.target" ];
|
after = [ "multi-user.target" ];
|
||||||
after = [ "network.target" ];
|
requires = [ "multi-user.target" ];
|
||||||
description = "Pull the latest data for ${cfg.name}";
|
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 = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
User = "root";
|
User = "root";
|
||||||
WorkingDirectory = cfg.path;
|
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";
|
ExecStart = "${pkgs.git}/bin/git pull --all";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -20,6 +20,10 @@
|
|||||||
filesystem = "zfs";
|
filesystem = "zfs";
|
||||||
useSystemdBoot = true;
|
useSystemdBoot = true;
|
||||||
kernelParams = [ "i915.force_probe=56a5" "i915.enable_guc=2" ];
|
kernelParams = [ "i915.force_probe=56a5" "i915.enable_guc=2" ];
|
||||||
|
kernel.sysctl = {
|
||||||
|
"vm.overcommit_memory" = 1;
|
||||||
|
"vm.swappiness" = 10;
|
||||||
|
};
|
||||||
binfmt.emulatedSystems = [ "aarch64-linux" ];
|
binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user