summary refs log tree commit diff
path: root/nixos/modules/services/desktops/profile-sync-daemon.nix
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2016-12-10 16:38:33 +0100
committerJoachim Fasting <joachifm@fastmail.fm>2016-12-10 20:35:44 +0100
commit230994a30a33ff131d3e39c8f2deccb1919119f9 (patch)
tree8d589762edb84073f69869eb754e63281d5c84f2 /nixos/modules/services/desktops/profile-sync-daemon.nix
parent4697f83984f0f1e3b58267fcef3b15b7ce60901b (diff)
downloadnixlib-230994a30a33ff131d3e39c8f2deccb1919119f9.tar
nixlib-230994a30a33ff131d3e39c8f2deccb1919119f9.tar.gz
nixlib-230994a30a33ff131d3e39c8f2deccb1919119f9.tar.bz2
nixlib-230994a30a33ff131d3e39c8f2deccb1919119f9.tar.lz
nixlib-230994a30a33ff131d3e39c8f2deccb1919119f9.tar.xz
nixlib-230994a30a33ff131d3e39c8f2deccb1919119f9.tar.zst
nixlib-230994a30a33ff131d3e39c8f2deccb1919119f9.zip
psd service: assert that at least one user must be configured
Using the default config, a user will experience a run-time failure.
This is poor UX, assert the requirement up-front.
Diffstat (limited to 'nixos/modules/services/desktops/profile-sync-daemon.nix')
-rw-r--r--nixos/modules/services/desktops/profile-sync-daemon.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/nixos/modules/services/desktops/profile-sync-daemon.nix b/nixos/modules/services/desktops/profile-sync-daemon.nix
index d66ecef2385a..e3f74df3e573 100644
--- a/nixos/modules/services/desktops/profile-sync-daemon.nix
+++ b/nixos/modules/services/desktops/profile-sync-daemon.nix
@@ -86,6 +86,12 @@ in {
   };
 
   config = mkIf cfg.enable {
+    assertions = [
+      { assertion = cfg.users != [];
+        message = "services.psd.users must contain at least one user";
+      }
+    ];
+
     systemd = {
       services = {
         psd = {