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
|
./system76Scheduler
|
||||||
./dbus
|
./dbus
|
||||||
./kdeconnect
|
./kdeconnect
|
||||||
|
./gnome
|
||||||
|
./gvfs
|
||||||
];
|
];
|
||||||
|
|
||||||
options.systemModules.services = {
|
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, ... }:
|
{ lib, config, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.systemModules.services.system76Scheduler;
|
inherit (lib) mkIf;
|
||||||
inherit (lib) mkEnableOption mkIf;
|
host = config.systemModules.host;
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
options.systemModules.services.system76Scheduler = {
|
config = mkIf (host.type != "phone") {
|
||||||
enable = mkEnableOption "Enable system 76 scheduler module";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
|
|
||||||
services.system76-scheduler = {
|
services.system76-scheduler = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue