summaryrefslogtreecommitdiff
path: root/home-modules/services
diff options
context:
space:
mode:
Diffstat (limited to 'home-modules/services')
-rw-r--r--home-modules/services/default.nix11
-rw-r--r--home-modules/services/direnv.nix17
-rw-r--r--home-modules/services/syncthing.nix14
-rw-r--r--home-modules/services/vdirsyncer.nix43
4 files changed, 53 insertions, 32 deletions
diff --git a/home-modules/services/default.nix b/home-modules/services/default.nix
index 7506f86..9f13709 100644
--- a/home-modules/services/default.nix
+++ b/home-modules/services/default.nix
@@ -1,7 +1,12 @@
-{lib, pkgs ,...}: {
- imports = [./vdirsyncer.nix ./direnv.nix ./syncthing.nix];
+{ lib, pkgs, ... }:
+{
+ imports = [
+ ./vdirsyncer.nix
+ ./direnv.nix
+ ./syncthing.nix
+ ];
- # Gnome keyring, very smort
+ # Gnome keyring, very smort
services.gnome-keyring.enable = true;
home.packages = [ pkgs.gcr ];
}
diff --git a/home-modules/services/direnv.nix b/home-modules/services/direnv.nix
index 7e68f99..9ddab97 100644
--- a/home-modules/services/direnv.nix
+++ b/home-modules/services/direnv.nix
@@ -1,11 +1,16 @@
-{pkgs, config, lib ,...}:
{
- options.homesv.direnv.enable = lib.mkEnableOption "Enable Direnv support";
- config = lib.mkIf config.homesv.direnv.enable {
+ pkgs,
+ config,
+ lib,
+ ...
+}:
+{
+ options.homesv.direnv.enable = lib.mkEnableOption "Enable Direnv support";
+ config = lib.mkIf config.homesv.direnv.enable {
programs.direnv = {
- enable = true;
- enableZshIntegration = true;
- nix-direnv.enable = true;
+ enable = true;
+ enableZshIntegration = true;
+ nix-direnv.enable = true;
};
};
}
diff --git a/home-modules/services/syncthing.nix b/home-modules/services/syncthing.nix
index b264433..b518dd6 100644
--- a/home-modules/services/syncthing.nix
+++ b/home-modules/services/syncthing.nix
@@ -1,9 +1,13 @@
-{ config, pkgs, lib ,... }:
{
- config = lib.mkIf config.homeapps.presets.connectivity.enable {
+ config,
+ pkgs,
+ lib,
+ ...
+}:
+{
+ config = lib.mkIf config.homeapps.presets.connectivity.enable {
services.syncthing = {
- enable = true;
+ enable = true;
};
- };
+ };
}
-
diff --git a/home-modules/services/vdirsyncer.nix b/home-modules/services/vdirsyncer.nix
index c5dd2cc..a849637 100644
--- a/home-modules/services/vdirsyncer.nix
+++ b/home-modules/services/vdirsyncer.nix
@@ -1,29 +1,35 @@
-{pkgs, inputs, config, lib, ...}:
-let
- cfg = config.homesv.vdirsyncer;
-in
-{
+{
+ pkgs,
+ inputs,
+ config,
+ lib,
+ ...
+}:
+let
+ cfg = config.homesv.vdirsyncer;
+in
+{
options.homesv.vdirsyncer = {
- enable = lib.mkEnableOption "Enable syncing via vdirsyncer";
- user = lib.mkOption { default = config.home.username; };
- server = lib.mkOption { default= "https://webdav.wilkuu.xyz/dav.php"; };
+ enable = lib.mkEnableOption "Enable syncing via vdirsyncer";
+ user = lib.mkOption { default = config.home.username; };
+ server = lib.mkOption { default = "https://webdav.wilkuu.xyz/dav.php"; };
};
config = lib.mkIf cfg.enable {
sops.secrets.webdav_uname = {
sopsFile = ../../secrets/secrets.yaml;
- key="${cfg.user}/webdav/username";
- };
+ key = "${cfg.user}/webdav/username";
+ };
sops.secrets.webdav_pass = {
sopsFile = ../../secrets/secrets.yaml;
- key="${cfg.user}/webdav/password";
- };
+ key = "${cfg.user}/webdav/password";
+ };
services.vdirsyncer = {
- enable = true;
+ enable = true;
frequency = "*:0/5"; # About once in 5 minutes
- };
+ };
systemd.user.services.vdirsyncer.unitConfig.After = [ "sops-nix.service" ];
-
+
sops.templates."vdirsyncer_config_${cfg.user}" = {
content = ''
[general]
@@ -67,8 +73,9 @@ in
'';
};
home.file.".config/vdirsyncer/config" = {
- source = config.lib.file.mkOutOfStoreSymlink config.sops.templates."vdirsyncer_config_${cfg.user}".path;
+ source =
+ config.lib.file.mkOutOfStoreSymlink
+ config.sops.templates."vdirsyncer_config_${cfg.user}".path;
};
};
-}
-
+}