feat(services): add synology drive module
parent
6fad257d5b
commit
f58c8dc6f8
|
@ -1,9 +1,12 @@
|
||||||
{ lib, pkgs, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
my = {
|
my = {
|
||||||
services.openconnect.enable = true;
|
services = {
|
||||||
|
openconnect.enable = true;
|
||||||
|
synology-drive.enable = true;
|
||||||
|
};
|
||||||
programs = {
|
programs = {
|
||||||
ssh.includeSecrets = mkDefault [ ../../secrets/ssh-home.age ];
|
ssh.includeSecrets = mkDefault [ ../../secrets/ssh-home.age ];
|
||||||
git.signing = mkDefault true;
|
git.signing = mkDefault true;
|
||||||
|
@ -57,8 +60,4 @@ with lib;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
synology-drive-client
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,6 @@ in
|
||||||
};
|
};
|
||||||
startupPrograms = [
|
startupPrograms = [
|
||||||
"randomWallpaper"
|
"randomWallpaper"
|
||||||
"${pkgs.synology-drive-client}/bin/synology-drive"
|
|
||||||
];
|
];
|
||||||
extraConfig = builtins.readFile ./bspwmrc;
|
extraConfig = builtins.readFile ./bspwmrc;
|
||||||
};
|
};
|
||||||
|
@ -89,7 +88,6 @@ in
|
||||||
feh
|
feh
|
||||||
pamixer
|
pamixer
|
||||||
playerctl
|
playerctl
|
||||||
synology-drive-client
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -224,6 +224,5 @@ in
|
||||||
bindm = $mainMod, mouse:272, movewindow
|
bindm = $mainMod, mouse:272, movewindow
|
||||||
bindm = $mainMod, mouse:273, resizewindow
|
bindm = $mainMod, mouse:273, resizewindow
|
||||||
|
|
||||||
exec-once=synology-drive
|
|
||||||
exec-once=randomWallpaper
|
exec-once=randomWallpaper
|
||||||
''
|
''
|
||||||
|
|
|
@ -71,7 +71,6 @@ in
|
||||||
command = "systemctl --user restart waybar";
|
command = "systemctl --user restart waybar";
|
||||||
always = true;
|
always = true;
|
||||||
}
|
}
|
||||||
{ command = "synology-drive"; }
|
|
||||||
{ command = "randomWallpaper"; }
|
{ command = "randomWallpaper"; }
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./dunst.nix
|
./dunst.nix
|
||||||
|
./gammastep.nix
|
||||||
./kdeconnect.nix
|
./kdeconnect.nix
|
||||||
./mullvad.nix
|
./mullvad.nix
|
||||||
./openconnect.nix
|
./openconnect.nix
|
||||||
./picom.nix
|
./picom.nix
|
||||||
./printing.nix
|
./printing.nix
|
||||||
./gammastep.nix
|
./synology-drive.nix
|
||||||
./wireguard.nix
|
./wireguard.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.my.services.synology-drive;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.services.synology-drive = {
|
||||||
|
enable = mkEnableOption "synology-drive";
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.synology-drive-client;
|
||||||
|
description = "The package to use for synology-drive";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
systemd.user.services.synology-drive = {
|
||||||
|
after = [ "graphical-session.target" ];
|
||||||
|
partOf = [ "graphical-session.target" ];
|
||||||
|
wantedBy = [ "graphical-session.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
ExitType = "cgroup";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = "1s";
|
||||||
|
ExecStartPre = "${pkgs.coreutils}/bin/rm -rf %h/.SynologyDrive/SynologyDrive.app %h/.SynologyDrive/cloud-connect.pid";
|
||||||
|
ExecStart = "${cfg.package}/bin/synology-drive";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
environment.systemPackages = [ cfg.package ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue