Add mime type module and refactor options
This commit is contained in:
parent
3a2266d44f
commit
69fb898087
25 changed files with 641 additions and 478 deletions
55
modules/programs/gnomeServices.nix
Normal file
55
modules/programs/gnomeServices.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
options,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.mods = {
|
||||
gnomeServices.enable = lib.mkOption {
|
||||
default = true;
|
||||
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.gnomeServices.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-settings-daemon
|
||||
];
|
||||
|
||||
gnome.gnome-keyring.enable = true;
|
||||
gvfs.enable = true;
|
||||
};
|
||||
}
|
||||
// lib.optionalAttrs (options ? home.packages) {
|
||||
home.packages =
|
||||
let
|
||||
packages = with pkgs; [
|
||||
nautilus
|
||||
sushi
|
||||
nautilus-python
|
||||
];
|
||||
in
|
||||
lib.mkIf config.mods.nautilus.enable packages;
|
||||
}
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue