mirror of
https://github.com/Superredstone/nixos.git
synced 2026-03-07 20:28:08 +01:00
feat(lib): add libde
This commit is contained in:
27
lib/libde.nix
Normal file
27
lib/libde.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{ currentSystemDe, lib, ... }:
|
||||||
|
let
|
||||||
|
ifDesktop = de: content: {
|
||||||
|
_type = "if";
|
||||||
|
condition = currentSystemDe == de;
|
||||||
|
inherit content;
|
||||||
|
};
|
||||||
|
ifNotDesktop = de: content: {
|
||||||
|
_type = "if";
|
||||||
|
condition = currentSystemDe != de;
|
||||||
|
inherit content;
|
||||||
|
};
|
||||||
|
ifGnome = ifDesktop "gnome";
|
||||||
|
ifPlasma = ifDesktop "plasma";
|
||||||
|
ifNone = ifDesktop "none";
|
||||||
|
ifNotNone = ifNotDesktop "none";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit
|
||||||
|
ifDesktop
|
||||||
|
ifNotDesktop
|
||||||
|
ifGnome
|
||||||
|
ifPlasma
|
||||||
|
ifNone
|
||||||
|
ifNotNone
|
||||||
|
;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user