From f8be9fab2525e907b1f242faa6b16f5fd63731d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sun, 17 Jul 2022 15:53:44 +0100 Subject: [PATCH] remove duplication --- nixos/backups.nix | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/nixos/backups.nix b/nixos/backups.nix index b8423c70..6a620998 100644 --- a/nixos/backups.nix +++ b/nixos/backups.nix @@ -7,6 +7,10 @@ let "--exclude='.config/Element/Cache'" "--exclude='.config/discord/Cache'" ]; + niceness = { + Nice = 19; + IOSchedulingClass = "idle"; + }; in { services = { @@ -28,12 +32,6 @@ in { }; }; - systemd.services.restic-backups-home-to-bolty.serviceConfig = { - Nice = 19; - IOSchedulingClass = "idle"; - }; - systemd.services.restic-backups-home-to-b2.serviceConfig = { - Nice = 19; - IOSchedulingClass = "idle"; - }; + systemd.services.restic-backups-home-to-bolty.serviceConfig = niceness; + systemd.services.restic-backups-home-to-b2.serviceConfig = niceness; }