mirror of
https://github.com/kmein/niveum
synced 2026-03-20 03:51:07 +01:00
feat: get rid of google drive
This commit is contained in:
@@ -1,17 +1,12 @@
|
|||||||
{ config, lib, pkgs, ... }: {
|
{ config, lib, pkgs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
<niveum/modules/seafile.nix>
|
<niveum/modules/seafile.nix>
|
||||||
<niveum/modules/google-drive.nix>
|
|
||||||
<niveum/modules/dropbox.nix>
|
<niveum/modules/dropbox.nix>
|
||||||
];
|
];
|
||||||
|
|
||||||
niveum = {
|
niveum = {
|
||||||
dropbox.enable = true;
|
dropbox.enable = true;
|
||||||
seafile.enable = true;
|
seafile.enable = true;
|
||||||
google-drive = {
|
|
||||||
enable = true;
|
|
||||||
directory = "${config.users.users.me.home}/cloud/google";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
system.activationScripts.home-symlinks = ''
|
system.activationScripts.home-symlinks = ''
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./constants.nix
|
./constants.nix
|
||||||
./dropbox.nix
|
./dropbox.nix
|
||||||
./google-drive.nix
|
|
||||||
./retiolum.nix
|
./retiolum.nix
|
||||||
./seafile.nix
|
./seafile.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
{ pkgs, config, lib, ... }:
|
|
||||||
with lib;
|
|
||||||
let cfg = config.niveum.google-drive;
|
|
||||||
in {
|
|
||||||
options.niveum.google-drive = {
|
|
||||||
enable = mkEnableOption "Google Drive";
|
|
||||||
directory = mkOption { type = types.path; };
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
systemd.user.services.google-drive = {
|
|
||||||
description = "Google Drive synchronisation service";
|
|
||||||
after = [ "network.target" ];
|
|
||||||
wantedBy = [ "default.target" ];
|
|
||||||
preStart = "mkdir -p ${cfg.directory}";
|
|
||||||
script = "${pkgs.google-drive-ocamlfuse}/bin/google-drive-ocamlfuse ${cfg.directory}";
|
|
||||||
preStop = "${pkgs.fuse}/bin/fusermount -u ${cfg.directory}";
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
RemainAfterExit = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user