Refactor gui module
This commit is contained in:
parent
edfe0e5bf9
commit
e65183b4a4
36 changed files with 236 additions and 309 deletions
|
|
@ -3,9 +3,11 @@
|
|||
lib,
|
||||
inputs,
|
||||
pkgs,
|
||||
osConfig ? null,
|
||||
...
|
||||
} @ args: let
|
||||
cfg = config.david.programs.niri;
|
||||
niri = osConfig.programs.niri.package;
|
||||
in {
|
||||
options = {
|
||||
david.programs.niri = {
|
||||
|
|
@ -17,16 +19,59 @@ in {
|
|||
};
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
david.programs.niri.enable = config.youthlic.programs.niri.enable;
|
||||
david.programs.niri.enable = osConfig.youthlic.gui.enabled == "niri";
|
||||
}
|
||||
(
|
||||
lib.mkIf cfg.enable {
|
||||
youthlic.programs.niri = {
|
||||
home.packages =
|
||||
(with pkgs; [
|
||||
swaynotificationcenter
|
||||
kdePackages.polkit-kde-agent-1
|
||||
wl-clipboard
|
||||
cliphist
|
||||
])
|
||||
++ [niri];
|
||||
qt = {
|
||||
enable = true;
|
||||
};
|
||||
xdg.portal = {
|
||||
configPackages = [niri];
|
||||
enable = true;
|
||||
extraPortals = lib.mkIf (
|
||||
!niri.cargoBuildNoDefaultFeatures || builtins.elem "xdp-gnome-screencast" niri.cargoBuildFeatures
|
||||
) [pkgs.xdg-desktop-portal-gnome];
|
||||
};
|
||||
xdg.configFile = let
|
||||
qtctConf =
|
||||
''
|
||||
[Appearance]
|
||||
standard_dialogs=xdgdesktopportal
|
||||
''
|
||||
+ lib.optionalString (config.qt.style ? name) ''
|
||||
style=${config.qt.style.name}
|
||||
'';
|
||||
in {
|
||||
"qt5ct/qt5ct.conf" = lib.mkForce {
|
||||
text = qtctConf;
|
||||
};
|
||||
"qt6ct/qt6ct.conf" = lib.mkForce {
|
||||
text = qtctConf;
|
||||
};
|
||||
};
|
||||
david.programs = {
|
||||
fuzzel.enable = true;
|
||||
waybar.enable = true;
|
||||
wluma.enable = true;
|
||||
swaync.enable = true;
|
||||
swaylock.enable = true;
|
||||
waypaper.enable = true;
|
||||
};
|
||||
programs.niri = {
|
||||
config =
|
||||
(lib.toList (import ./config.nix (args // {inherit pkgs;})))
|
||||
++ (lib.toList cfg.extraConfig);
|
||||
package = niri;
|
||||
};
|
||||
david.programs.wluma.enable = true;
|
||||
}
|
||||
)
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue