refactor(systemModules:services): enable if host.type != phone

This commit is contained in:
ooks-io 2024-04-29 22:51:57 +12:00
parent ba2cbc18de
commit 4a8095f271
4 changed files with 35 additions and 7 deletions

View file

@ -6,6 +6,8 @@
./system76Scheduler
./dbus
./kdeconnect
./gnome
./gvfs
];
options.systemModules.services = {

View file

@ -0,0 +1,18 @@
{ lib, config, pkgs, ... }:
let
inherit (lib) mkIf;
host = config.systemModules.host;
in
{
config = mkIf (host.type != "phone" && host.type != "server") {
services = {
gnome = {
glib-networking.enable = true;
gnome-keyring.enable = true;
};
udev.packages = [ pkgs.gnome.gnome-settings-daemon ];
};
};
}

View file

@ -0,0 +1,12 @@
{ lib, config, ... }:
let
inherit (lib) mkIf;
host = config.systemModules.host;
in
{
config = mkIf ( host.type != "phone") {
services.gvfs = true;
};
}

View file

@ -1,16 +1,12 @@
{ lib, config, ... }:
let
cfg = config.systemModules.services.system76Scheduler;
inherit (lib) mkEnableOption mkIf;
inherit (lib) mkIf;
host = config.systemModules.host;
in
{
options.systemModules.services.system76Scheduler = {
enable = mkEnableOption "Enable system 76 scheduler module";
};
config = mkIf cfg.enable {
config = mkIf (host.type != "phone") {
services.system76-scheduler = {
enable = true;