nixos-configuration/modules/desktop/gnome.nix

67 lines
1.5 KiB
Nix
Raw Normal View History

2023-09-09 13:36:21 +02:00
{
config,
pkgs,
lib,
...
2023-09-09 14:57:55 +02:00
}: let
2023-09-24 12:39:28 +02:00
isEnabled = config.my.desktop.enableGnome;
enableHomeManager = config.my.modulesCfg.enableHomeManager;
2023-09-09 13:36:21 +02:00
in {
options.my.desktop.enableGnome = lib.mkEnableOption "gnome desktop";
2023-09-24 12:39:28 +02:00
config = lib.mkMerge [
(lib.mkIf isEnabled {
my.desktop.enable = true;
2023-09-09 15:44:15 +02:00
2023-09-24 12:39:28 +02:00
services = {
xserver = {
# Enable the GNOME Desktop Environment.
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
};
2023-09-09 13:36:21 +02:00
2023-09-24 12:39:28 +02:00
gnome = {
tracker-miners.enable = false;
tracker.enable = false;
};
2023-09-09 13:36:21 +02:00
};
2023-09-24 12:39:28 +02:00
programs.gpaste.enable = true;
2023-09-09 13:36:21 +02:00
2023-09-24 12:39:28 +02:00
environment = {
systemPackages = with pkgs; [
gnomeExtensions.gsconnect
];
2023-09-09 13:36:21 +02:00
2023-09-24 12:39:28 +02:00
# remove some gnome default apps
gnome.excludePackages = with pkgs.gnome; [
cheese # photo booth
epiphany # web browser
evince # document viewer
geary # email client
seahorse # password manager
gnome-clocks
gnome-maps
gnome-weather
gnome-music
pkgs.gnome-connections
];
};
})
(lib.mkIf (isEnabled && enableHomeManager) {
home-manager.sharedModules = [
{
home.packages = with pkgs; [
amberol
];
dconf.settings = {
"org/gnome/desktop/peripherals/keyboard" = {
numlock-state = true;
};
};
}
];
})
];
2023-09-09 13:36:21 +02:00
}