nixos/bcachefs: handle / (root filesystem) in autoScrub service
Without this, the service and timer name become like this:
❯ systemctl status bcachefs-scrub--.service
○ bcachefs-scrub--.service - bcachefs scrub on /
Loaded: loaded (/etc/systemd/system/bcachefs-scrub--.service; linked; preset: ignored)
Active: inactive (dead)
TriggeredBy: ● bcachefs-scrub--.timer
This commit is contained in:
@@ -316,7 +316,7 @@ in
|
||||
scrubTimer =
|
||||
fs:
|
||||
let
|
||||
fs' = utils.escapeSystemdPath fs;
|
||||
fs' = if fs == "/" then "root" else utils.escapeSystemdPath fs;
|
||||
in
|
||||
lib.nameValuePair "bcachefs-scrub-${fs'}" {
|
||||
description = "regular bcachefs scrub timer on ${fs}";
|
||||
@@ -336,7 +336,7 @@ in
|
||||
scrubService =
|
||||
fs:
|
||||
let
|
||||
fs' = utils.escapeSystemdPath fs;
|
||||
fs' = if fs == "/" then "root" else utils.escapeSystemdPath fs;
|
||||
in
|
||||
lib.nameValuePair "bcachefs-scrub-${fs'}" {
|
||||
description = "bcachefs scrub on ${fs}";
|
||||
|
||||
Reference in New Issue
Block a user