Rclone mount
This commit is contained in:
parent
e42191a53f
commit
6bd039f9b4
5 changed files with 42 additions and 0 deletions
|
|
@ -134,6 +134,7 @@
|
||||||
|
|
||||||
# S3 cache write
|
# S3 cache write
|
||||||
./modules/nixos/s3_cache_write.nix
|
./modules/nixos/s3_cache_write.nix
|
||||||
|
{ age.secrets.s3_odin = { file = ./secrets/s3_odin.age; owner = "bertof"; }; }
|
||||||
|
|
||||||
./modules/nixos/pro_audio.nix
|
./modules/nixos/pro_audio.nix
|
||||||
./modules/nixos/kdeconnect.nix
|
./modules/nixos/kdeconnect.nix
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,7 @@
|
||||||
../../modules/hm/pass.nix
|
../../modules/hm/pass.nix
|
||||||
../../modules/hm/pro_audio.nix
|
../../modules/hm/pro_audio.nix
|
||||||
# ../../modules/hm/pycharm.nix
|
# ../../modules/hm/pycharm.nix
|
||||||
|
../../modules/hm/rclone-mount.nix
|
||||||
../../modules/hm/research.nix
|
../../modules/hm/research.nix
|
||||||
# ../../modules/hm/rofi.nix
|
# ../../modules/hm/rofi.nix
|
||||||
# ../../modules/hm/screen_locker.nix
|
# ../../modules/hm/screen_locker.nix
|
||||||
|
|
|
||||||
26
modules/hm/rclone-mount.nix
Normal file
26
modules/hm/rclone-mount.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{ pkgs, lib, config, nixosConfig, ... }:
|
||||||
|
let
|
||||||
|
|
||||||
|
rclone_config = nixosConfig.age.secrets."s3_${nixosConfig.networking.hostName}".path;
|
||||||
|
mounts = { "minio" = "/home/${config.home.username}/minio/"; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
systemd.user.services = lib.attrsets.mapAttrs'
|
||||||
|
(name: path: {
|
||||||
|
name = "rclone-${name}";
|
||||||
|
value = {
|
||||||
|
Unit = {
|
||||||
|
Description = "rclone mount for ${name}";
|
||||||
|
After = [ "default.target" ];
|
||||||
|
PartOf = [ "default.target" ];
|
||||||
|
};
|
||||||
|
Install.WantedBy = [ "default.target" ];
|
||||||
|
Service = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p ${path}";
|
||||||
|
ExecStart = "${pkgs.rclone}/bin/rclone --config ${rclone_config} mount ${name}:/ ${path} -v --vfs-cache-mode=writes";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
mounts;
|
||||||
|
}
|
||||||
13
secrets/s3_odin.age
Normal file
13
secrets/s3_odin.age
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 hGQASA tex8+yPPgPvHoVnxPl3fksRVnEkWYemqX16ai1QsMmE
|
||||||
|
D4T30hAdM/DJhHR0y5tdy1QwpU+2rukhgxwbg6MNWrA
|
||||||
|
-> ssh-ed25519 4behFA OjLxTHSfVJByBmd6eDCBrDrN0HS9ozRZpvqfUFEmq1M
|
||||||
|
TTWDCGupocqm5gZVcLLYuFqPCAJUOnLnpXp3u9rIN2Y
|
||||||
|
-> ssh-ed25519 IvyYug yl7u/tlaBMat6nndTkHPTh6tIjSCp3Q1LQsnxA/M4AE
|
||||||
|
CteyUsu54DFvcyu9uxh417jQO3CefC9l3qouPMb5QhI
|
||||||
|
--- kK+rlwK80Eonmw5NkEIJStL3MDmxibN8Ia+DMtnGDLY
|
||||||
|
•¾Í,©«€(ì´åõìî⻢.Yœ'?¢Þ<C2A2>»h˜Ð/‚¸<ŒNh
|
||||||
|
~bÕõÜÏ{ÖÑaÅ•Yov¤<76>ËRmé`lˆOžÒIN8²ƒ!ÿ†¥Æ|_–¿~熔à<:qÄ!’âÌJ ¼h13
`·ÓÀ²&q½¼ŠÑW‘´óìˆ1 \<5C>1å·2>D°˜
|
||||||
|
Ð~D/ù3MWZc N‘a_
|
||||||
|
É<EFBFBD>*c&î/ý!ü)¥Eí<45>zD
ìeÛ÷‡,&3
|
||||||
|
ÐQ#žé
|
||||||
|
|
@ -49,4 +49,5 @@ in
|
||||||
"wg_psk.age".publicKeys = devUsers ++ systems;
|
"wg_psk.age".publicKeys = devUsers ++ systems;
|
||||||
"s3_cache_write.age".publicKeys = devUsers ++ [ thor odin ];
|
"s3_cache_write.age".publicKeys = devUsers ++ [ thor odin ];
|
||||||
"s3_cache_read.age".publicKeys = devUsers ++ systems;
|
"s3_cache_read.age".publicKeys = devUsers ++ systems;
|
||||||
|
"s3_odin.age".publicKeys = devUsers ++ [ odin ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue