refactor(systemModules:services): enable if host.type != phone
This commit is contained in:
parent
ba2cbc18de
commit
4a8095f271
4 changed files with 35 additions and 7 deletions
|
|
@ -6,6 +6,8 @@
|
|||
./system76Scheduler
|
||||
./dbus
|
||||
./kdeconnect
|
||||
./gnome
|
||||
./gvfs
|
||||
];
|
||||
|
||||
options.systemModules.services = {
|
||||
|
|
|
|||
18
system/modules/services/gnome/default.nix
Normal file
18
system/modules/services/gnome/default.nix
Normal 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 ];
|
||||
};
|
||||
};
|
||||
}
|
||||
12
system/modules/services/gvfs/default.nix
Normal file
12
system/modules/services/gvfs/default.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
host = config.systemModules.host;
|
||||
in
|
||||
|
||||
{
|
||||
config = mkIf ( host.type != "phone") {
|
||||
services.gvfs = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue