mirror of
https://github.com/ItsDrike/nixdots
synced 2025-07-01 05:50:42 +00:00
Actually enforce the roles
This commit is contained in:
parent
01e3567653
commit
dd00ed5f70
9 changed files with 238 additions and 193 deletions
|
@ -1,11 +1,16 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
services = {
|
||||
# enable GVfs, a userspace virtual filesystem
|
||||
# (allows viewing ftp,sftp,... directly from the file manager)
|
||||
gvfs.enable = true;
|
||||
{ lib, config, ...}: 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
|
||||
# (allows viewing ftp,sftp,... directly from the file manager)
|
||||
gvfs.enable = true;
|
||||
|
||||
# Storage daemon required for udiskie auto-mount
|
||||
udisks2.enable = !config.boot.isContainer;
|
||||
# Storage daemon required for udiskie auto-mount
|
||||
udisks2.enable = !config.boot.isContainer;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue