Update mount config
This commit is contained in:
parent
5d4eb85d53
commit
c574b8d106
1 changed files with 27 additions and 19 deletions
|
|
@ -42,26 +42,34 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user.services.garage-home-s3 = {
|
systemd.user.services.garage-home-s3-bertof =
|
||||||
Unit = {
|
let
|
||||||
After = [ "network.target" "network-online.target" "local-fs.target" ];
|
path = "/home/bertof/s3/bertof";
|
||||||
AssertPathIsDirectory = "/home/bertof/s3";
|
in
|
||||||
AssertPathIsReadWrite = "/home/bertof/s3";
|
{
|
||||||
Description = "Mount S3 bucket in bertof's home";
|
Unit = {
|
||||||
StartLimitBurst = 5;
|
After = [ "network.target" "network-online.target" "local-fs.target" ];
|
||||||
StartLimitInterval = 200;
|
# AssertPathIsDirectory = path;
|
||||||
Wants = [ "network.target" "network-online.target" ];
|
# AssertPathIsReadWrite = path;
|
||||||
|
Description = "Mount S3 bucket in bertof's home";
|
||||||
|
StartLimitBurst = 5;
|
||||||
|
StartLimitInterval = 200;
|
||||||
|
Wants = [ "network.target" "network-online.target" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
ExecStart = pkgs.writeShellScript "garage-home-s3-bertof" ''
|
||||||
|
set -e
|
||||||
|
${pkgs.coreutils}/bin/mkdir -p '${path}'
|
||||||
|
${pkgs.s3fs}/bin/s3fs -f -d bertof ${path} -o passwd_file=${nixosConfig.age.secrets.garage_bertof_odin_key.path},use_path_request_style,url=http://localhost:3900
|
||||||
|
'';
|
||||||
|
Restart = "always";
|
||||||
|
RestartSec = 30;
|
||||||
|
Type = "exec";
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
# WantedBy = [ "default.target" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
Service = {
|
|
||||||
ExecStart = "${pkgs.s3fs}/bin/s3fs -f -d bertof /home/bertof/s3 -o passwd_file=${nixosConfig.age.secrets.garage_bertof_odin_key.path},use_path_request_style,url=http://localhost:3900";
|
|
||||||
Restart = "always";
|
|
||||||
RestartSec = 30;
|
|
||||||
Type = "exec";
|
|
||||||
};
|
|
||||||
Install = {
|
|
||||||
# WantedBy = [ "default.target" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
../../modules/hm/__basic.nix
|
../../modules/hm/__basic.nix
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue