Introduce more options to configure individual modules
This commit is contained in:
parent
351584ecb4
commit
e3619d6c94
13 changed files with 668 additions and 531 deletions
|
|
@ -9,35 +9,47 @@
|
|||
options.mods = {
|
||||
gnome_services.enable = lib.mkOption {
|
||||
default = true;
|
||||
type = lib.types.bool;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables gnome services: keyring and settings daemon.
|
||||
Note: Do not use these for environments which ship these functionalities by default: GNOME, KDE
|
||||
'';
|
||||
};
|
||||
nautilus.enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables and configures Nautilus
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.gnome_services.enable (
|
||||
lib.optionalAttrs (options ? services.gnome.gnome-keyring) {
|
||||
programs.dconf.enable = true;
|
||||
services = {
|
||||
# needed for GNOME services outside of GNOME Desktop
|
||||
dbus.packages = with pkgs; [
|
||||
gcr
|
||||
gnome.gnome-settings-daemon
|
||||
];
|
||||
config =
|
||||
lib.mkIf config.mods.gnome_services.enable (
|
||||
lib.optionalAttrs (options ? services.gnome.gnome-keyring) {
|
||||
programs.dconf.enable = true;
|
||||
services = {
|
||||
# needed for GNOME services outside of GNOME Desktop
|
||||
dbus.packages = with pkgs; [
|
||||
gcr
|
||||
gnome.gnome-settings-daemon
|
||||
];
|
||||
|
||||
gnome.gnome-keyring.enable = true;
|
||||
gvfs.enable = true;
|
||||
};
|
||||
}
|
||||
gnome.gnome-keyring.enable = true;
|
||||
gvfs.enable = true;
|
||||
};
|
||||
}
|
||||
)
|
||||
// lib.optionalAttrs (options ? home.packages) {
|
||||
home.packages = with pkgs; [
|
||||
nautilus
|
||||
sushi
|
||||
nautilus-python
|
||||
];
|
||||
}
|
||||
);
|
||||
home.packages = lib.mkIf config.mods.gnome_services.nautilus.enable (
|
||||
with pkgs;
|
||||
[
|
||||
nautilus
|
||||
sushi
|
||||
nautilus-python
|
||||
]
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue