mirror of
https://github.com/Superredstone/nixos.git
synced 2026-03-07 20:28:08 +01:00
refactor(nix-config): extract de conditionals into libde
This commit is contained in:
@@ -4,6 +4,11 @@
|
|||||||
currentSystemDe,
|
currentSystemDe,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
libDe = import ../../lib/libde.nix {
|
||||||
|
inherit currentSystemDe lib;
|
||||||
|
};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
services = {
|
services = {
|
||||||
xserver.enable = true;
|
xserver.enable = true;
|
||||||
@@ -13,20 +18,20 @@
|
|||||||
|
|
||||||
# Display managers
|
# Display managers
|
||||||
displayManager = {
|
displayManager = {
|
||||||
sddm = lib.mkIf (currentSystemDe == "plasma") {
|
sddm = libDe.ifPlasma {
|
||||||
enable = true;
|
enable = true;
|
||||||
wayland.enable = true;
|
wayland.enable = true;
|
||||||
};
|
};
|
||||||
gdm.enable = lib.mkIf (currentSystemDe == "gnome") true;
|
gdm.enable = libDe.ifGnome true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Desktop environments
|
# Desktop environments
|
||||||
desktopManager = {
|
desktopManager = {
|
||||||
plasma6.enable = lib.mkIf (currentSystemDe == "plasma") true;
|
plasma6.enable = libDe.ifPlasma true;
|
||||||
gnome.enable = lib.mkIf (currentSystemDe == "gnome") true;
|
gnome.enable = libDe.ifGnome true;
|
||||||
};
|
};
|
||||||
|
|
||||||
gnome.gnome-keyring.enable = lib.mkIf (currentSystemDe == "gnome") true;
|
gnome.gnome-keyring.enable = libDe.ifGnome true;
|
||||||
};
|
};
|
||||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
||||||
elisa
|
elisa
|
||||||
@@ -54,7 +59,7 @@
|
|||||||
portal.enable = true;
|
portal.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.kdeconnect = lib.mkIf (currentSystemDe != "none") {
|
programs.kdeconnect = libDe.ifNotNone {
|
||||||
enable = true;
|
enable = true;
|
||||||
package =
|
package =
|
||||||
if (currentSystemDe == "gnome") then
|
if (currentSystemDe == "gnome") then
|
||||||
@@ -65,7 +70,7 @@
|
|||||||
|
|
||||||
programs.thunar.plugins =
|
programs.thunar.plugins =
|
||||||
with pkgs.xfce;
|
with pkgs.xfce;
|
||||||
lib.mkIf (currentSystemDe == "gnome") [ ]
|
libDe.ifGnome [ ]
|
||||||
++ [
|
++ [
|
||||||
thunar-archive-plugin
|
thunar-archive-plugin
|
||||||
thunar-media-tags-plugin
|
thunar-media-tags-plugin
|
||||||
|
|||||||
Reference in New Issue
Block a user