From de70d77478b3ca9220042f73712290d2d90fda73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Mon, 28 Jan 2019 22:23:57 +0100 Subject: [PATCH] small changes + google-drive timer ~ i3lock: light-locker + httpie ~ cloc: tokei --- config.nix | 17 ++++++++++++----- configs/graphics.nix | 2 ++ configs/packages.nix | 3 ++- options.nix | 3 ++- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/config.nix b/config.nix index 58ed48a..be682c5 100644 --- a/config.nix +++ b/config.nix @@ -58,11 +58,18 @@ in { shell = pkgs.zsh; }; - services.cron = { - enable = true; - systemCronJobs = [ - "0 * * * * ${pkgs.grive2}/bin/grive -p ${config.users.users.kfm.home}/cloud/gdrive" - ]; + systemd.user.services.google-drive = { + description = "Google Drive synchronisation service"; + wants = [ "network-online.target" ]; + script = '' + ${pkgs.grive2}/bin/grive -p ${config.users.users.kfm.home}/cloud/gdrive + ''; + serviceConfig.Restart = "on-failure"; + }; + + systemd.user.timers.google-drive = { + wantedBy = [ "timers.target" ]; + timerConfig.OnUnitActiveSec = "5minutes"; }; programs.tmux = { diff --git a/configs/graphics.nix b/configs/graphics.nix index a649327..0daa0f2 100644 --- a/configs/graphics.nix +++ b/configs/graphics.nix @@ -18,6 +18,8 @@ ${pkgs.feh}/bin/feh --bg-fill $(find ${../art} -type f | shuf -n 1) & ${pkgs.dropbox-cli}/bin/dropbox start & ${pkgs.seafile-client}/bin/seafile-applet & + ${pkgs.systemd}/bin/systemctl --user import-environment XDG_SESSION_PATH + ${pkgs.lightlocker}/bin/light-locker ${pkgs.openssh}/bin/ssh-add ''; displayManager.lightdm.greeters.gtk = { diff --git a/configs/packages.nix b/configs/packages.nix index 54d1cdf..3d4697e 100644 --- a/configs/packages.nix +++ b/configs/packages.nix @@ -43,6 +43,7 @@ in with pkgs; thunderbird w3m wget + httpie whois ] ++ [ # media ffmpeg @@ -113,7 +114,7 @@ in with pkgs; (executables haskellPackages.pandoc-citeproc) asciidoctor ] ++ [ # programming - cloc + tokei gnumake cabal2nix chicken diff --git a/options.nix b/options.nix index be1031d..7662822 100644 --- a/options.nix +++ b/options.nix @@ -17,7 +17,8 @@ in { terminal = "${pkgs.rxvt_unicode-with-plugins}/bin/urxvtc"; browser = "${pkgs.chromium}/bin/chromium"; fileManager = "${terminal} -e ${pkgs.ranger}/bin/ranger"; - locker = "${pkgs.i3lock}/bin/i3lock -u -c ${strings.removePrefix "#" colorScheme.background}"; + # locker = "${pkgs.i3lock}/bin/i3lock -u -c ${strings.removePrefix "#" colorScheme.background}"; + locker = "${pkgs.lightlocker}/bin/light-locker-command -l"; }; options.constants = {