This repository has been archived on 2023-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
nil/modules/applications/nextcloud.nix

41 lines
1.0 KiB
Nix
Raw Normal View History

2021-12-14 05:24:26 +00:00
{ config, lib, pkgs, ... }:
let
cfg = config.application.nextcloud;
graphical = config.graphical;
in with lib; {
options = {
application.nextcloud = {
enable = mkOption {
default = graphical.enable;
type = with types; bool;
description = "Dropbox for people who don't like dropbox";
};
};
};
2021-12-02 05:05:52 +00:00
2021-12-14 05:24:26 +00:00
config = mkIf cfg.enable {
home-manager.users.james = {
home.packages = with pkgs; [ nextcloud-client ];
systemd.user.services = {
nextcloud = {
Unit = {
Description = "Nextcloud - A slighly more GNU friendly dropbox";
BindsTo = [ "graphical-session.target" ];
Wants = [ "graphical-session-pre.target" ];
After = [ "graphical-session-pre.target" ];
};
Service = {
Type = "simple";
ExecStart = "${pkgs.nextcloud-client}/bin/nextclient --background";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
2021-12-02 05:05:52 +00:00
};
};
};
};
}