nix-config/specializations/phosh.nix

58 lines
1.5 KiB
Nix
Raw Normal View History

{ config, lib, ... }:
let
inherit (lib) mkForce;
inherit (config.modules.system) username;
inherit (builtins) attrValues;
getColorCh = colorName: channel: config.lib.stylix.colors."${colorName}-rgb-${channel}";
2024-07-18 02:49:59 +02:00
rgba = color: transparency: ''rgba(${getColorCh color "r"}, ${getColorCh color "g"}, ${getColorCh color "b"}, ${transparency})'';
bg = ''linear-gradient(${rgba "base00" "0.7"}, ${rgba "base00" "0.7"})'';
in
{
programs.hyprland.enable = mkForce false;
i18n.inputMethod.enable = mkForce false;
services.greetd.enable = mkForce false;
xserver = {
displayManager.lightdm.enable = false;
desktopManager.phosh = {
enable = true;
group = "users";
user = username;
phocConfig = {
xwayland = "immediate";
};
};
};
home-manager.sharedModules = attrValues {
background = {
stylix.targets.gtk.extraCss = /* css */ ''
2024-07-18 02:49:59 +02:00
phosh-lockscreen {
background: ${bg}, url('file:///home/${username}/wall-lock.jpg');
}
phosh-app-grid {
2024-07-18 02:49:59 +02:00
background: ${bg}, url('file:///home/${username}/wall-grid.jpg');
}
phosh-top-panel {
2024-07-18 02:49:59 +02:00
background: ${bg}, url('file:///home/${username}/wall-panel.jpg');
}
phosh-home {
2024-07-18 02:49:59 +02:00
background: ${bg}, url('file:///home/${username}/wall-home.jpg');
}
phosh-lockscreen, phosh-app-grid, phosh-top-panel, phosh-home {
background-size: cover;
background-position: center;
}
'';
};
};
}