Remove mount-downloads service, make onedrive mount wait for hyprland
This commit is contained in:
parent
e16e3ff288
commit
c6ea71ff49
|
@ -15,45 +15,25 @@
|
||||||
wayland.windowManager.hyprland.settings.monitor = [
|
wayland.windowManager.hyprland.settings.monitor = [
|
||||||
"desc:Dell Inc. DELL P3223QE CCG8YN3,preferred,auto,1.5"
|
"desc:Dell Inc. DELL P3223QE CCG8YN3,preferred,auto,1.5"
|
||||||
];
|
];
|
||||||
systemd.user.services =
|
systemd.user.service.mount-onedrive =
|
||||||
let
|
let
|
||||||
inherit (config.xdg) configHome;
|
target = "${config.home.homeDirectory}/OneDrive";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
mount-documents =
|
Unit = {
|
||||||
let
|
Description = "Mount OneDrive to local directory";
|
||||||
target = "${config.home.homeDirectory}/OneDrive";
|
After = [
|
||||||
in
|
"network-online.target"
|
||||||
{
|
"hyprland-session.target"
|
||||||
Unit = {
|
];
|
||||||
Description = "Mount OneDrive to local directory";
|
};
|
||||||
After = [ "network-online.target" ];
|
Service = {
|
||||||
};
|
Type = "notify";
|
||||||
Service = {
|
ExecStartPre = "/usr/bin/env mkdir -p ${target}";
|
||||||
Type = "notify";
|
ExecStart = "${pkgs.rclone}/bin/rclone --config=${config.xdg.configHome}/rclone/rclone.conf --vfs-cache-mode writes --ignore-checksum mount \"OneDrive:\" ${target}";
|
||||||
ExecStartPre = "/usr/bin/env mkdir -p ${target}";
|
ExecStop = "/bin/fusermount -u ${target}";
|
||||||
ExecStart = "${pkgs.rclone}/bin/rclone --config=${configHome}/rclone/rclone.conf --vfs-cache-mode writes --ignore-checksum mount \"OneDrive:\" ${target}";
|
};
|
||||||
ExecStop = "/bin/fusermount -u ${target}";
|
Install.WantedBy = [ "default.target" ];
|
||||||
};
|
|
||||||
Install.WantedBy = [ "default.target" ];
|
|
||||||
};
|
|
||||||
mount-downloads =
|
|
||||||
let
|
|
||||||
target = config.xdg.userDirs.download;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
Unit = {
|
|
||||||
Description = "Mount Downloads directory to OneDrive";
|
|
||||||
After = [ "network-online.target" ];
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
Type = "notify";
|
|
||||||
ExecStartPre = "/usr/bin/env mkdir -p ${target}";
|
|
||||||
ExecStart = "${pkgs.rclone}/bin/rclone --config=${configHome}/rclone/rclone.conf --vfs-cache-mode writes --ignore-checksum mount \"OneDrive:Downloads\" ${target}";
|
|
||||||
ExecStop = "/bin/fusermount -u ${target}";
|
|
||||||
};
|
|
||||||
Install.WantedBy = [ "default.target" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
boot = {
|
boot = {
|
||||||
|
|
Loading…
Reference in a new issue