mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-13 09:17:07 +03:00
Merge pull request #245105 from thoughtfull-systems/xfce-exclude-packages
nixos/xfce: add environment.xfce.excludePackages option
This commit is contained in:
commit
34d40c6f20
@ -1,9 +1,10 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, utils, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.xserver.desktopManager.xfce;
|
||||
excludePackages = config.environment.xfce.excludePackages;
|
||||
|
||||
in
|
||||
{
|
||||
@ -69,10 +70,17 @@ in
|
||||
description = lib.mdDoc "Enable the XFCE screensaver.";
|
||||
};
|
||||
};
|
||||
|
||||
environment.xfce.excludePackages = mkOption {
|
||||
default = [];
|
||||
example = literalExpression "[ pkgs.xfce.xfce4-volumed-pulse ]";
|
||||
type = types.listOf types.package;
|
||||
description = lib.mdDoc "Which packages XFCE should exclude from the default environment";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs.xfce // pkgs; [
|
||||
environment.systemPackages = utils.removePackagesByName (with pkgs.xfce // pkgs; [
|
||||
glib # for gsettings
|
||||
gtk3.out # gtk-update-icon-cache
|
||||
|
||||
@ -121,7 +129,7 @@ in
|
||||
] ++ optionals (!cfg.noDesktop) [
|
||||
xfce4-panel
|
||||
xfdesktop
|
||||
] ++ optional cfg.enableScreensaver xfce4-screensaver;
|
||||
] ++ optional cfg.enableScreensaver xfce4-screensaver) excludePackages;
|
||||
|
||||
programs.xfconf.enable = true;
|
||||
programs.thunar.enable = true;
|
||||
@ -165,9 +173,9 @@ in
|
||||
programs.zsh.vteIntegration = mkDefault true;
|
||||
|
||||
# Systemd services
|
||||
systemd.packages = with pkgs.xfce; [
|
||||
systemd.packages = utils.removePackagesByName (with pkgs.xfce; [
|
||||
xfce4-notifyd
|
||||
];
|
||||
]) excludePackages;
|
||||
|
||||
security.pam.services.xfce4-screensaver.unixAuth = cfg.enableScreensaver;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user