From e20e63e57b946367b18a70141ceadc68f5b64649 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Mon, 10 Jun 2024 18:54:47 +0200 Subject: [PATCH] Add misc services --- system/roles/workstation/services/default.nix | 1 + system/roles/workstation/services/misc.nix | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 system/roles/workstation/services/misc.nix diff --git a/system/roles/workstation/services/default.nix b/system/roles/workstation/services/default.nix index a68d854..3f856bc 100644 --- a/system/roles/workstation/services/default.nix +++ b/system/roles/workstation/services/default.nix @@ -3,6 +3,7 @@ ./earlyoom.nix ./mount.nix ./printing.nix + ./misc.nix ]; } diff --git a/system/roles/workstation/services/misc.nix b/system/roles/workstation/services/misc.nix new file mode 100644 index 0000000..99d263e --- /dev/null +++ b/system/roles/workstation/services/misc.nix @@ -0,0 +1,20 @@ +{ + config, + lib, + ... +}: let + inherit (lib) mkIf; + + deviceType = config.myOptions.device.roles.type; + acceptedTypes = ["laptop" "desktop"]; +in { + config = mkIf (builtins.elem deviceType acceptedTypes) { + services = { + # enable GVfs - a userspace virtual filesystem + gvfs.enable = true; + + # storage daemon required for udiskie auto-mount + udisks2.enable = true; + }; + }; +}