mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-06-22 02:31:49 +02:00
meta: Move phosh config to specialization
This is part of attempting to use Hyprland over Phosh (again) for more control over things.
This commit is contained in:
parent
6d9149dbab
commit
051c903154
@ -1,11 +1,7 @@
|
|||||||
{ self, pkgs, lib, config, ... }:
|
{ self, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (builtins) attrValues;
|
inherit (builtins) attrValues;
|
||||||
|
|
||||||
transparency = "0.7";
|
|
||||||
getColorCh = colorName: channel: config.lib.stylix.colors."${colorName}-rgb-${channel}";
|
|
||||||
rgba = color: ''rgba(${getColorCh color "r"}, ${getColorCh color "g"}, ${getColorCh color "b"}, ${transparency})'';
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = attrValues self.nixosModules;
|
imports = attrValues self.nixosModules;
|
||||||
@ -28,34 +24,6 @@ in
|
|||||||
xdg-user-dirs
|
xdg-user-dirs
|
||||||
xresources
|
xresources
|
||||||
;
|
;
|
||||||
|
|
||||||
background = {
|
|
||||||
stylix.targets.gtk.extraCss = /* css */ ''
|
|
||||||
phosh-lockscreen, .phosh-lockshield {
|
|
||||||
background-image: linear-gradient(${rgba "base00"}, ${rgba "base00"}), url('file:///home/user/wall-lock.jpg');
|
|
||||||
background-size: cover;
|
|
||||||
background-position: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
phosh-app-grid {
|
|
||||||
background-image: linear-gradient(${rgba "base00"}, ${rgba "base00"}), url('file:///home/user/wall-grid.jpg');
|
|
||||||
background-size: cover;
|
|
||||||
background-position: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
phosh-top-panel {
|
|
||||||
background-image: linear-gradient(${rgba "base00"}, ${rgba "base00"}), url('file:///home/user/wall-panel.jpg');
|
|
||||||
background-size: cover;
|
|
||||||
background-position: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
phosh-home {
|
|
||||||
background-image: linear-gradient(${rgba "base00"}, ${rgba "base00"}), url('file:///home/user/wall-home.jpg');
|
|
||||||
background-size: cover;
|
|
||||||
background-position: center;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = attrValues {
|
environment.systemPackages = attrValues {
|
||||||
@ -73,7 +41,6 @@ in
|
|||||||
|
|
||||||
desktop = {
|
desktop = {
|
||||||
phone = true;
|
phone = true;
|
||||||
phosh = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.keyboardBinds = true;
|
hardware.keyboardBinds = true;
|
||||||
|
@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkEnableOption mkIf mkMerge mkOption;
|
inherit (lib) mkEnableOption mkIf mkMerge mkOption;
|
||||||
inherit (lib.types) float int;
|
inherit (lib.types) float int;
|
||||||
inherit (config.modules.system) username;
|
inherit (config.modules.system) username;
|
||||||
inherit (cfg) bloat gnome plasma container opacity fontSize graphical phone phosh;
|
inherit (cfg) bloat gnome plasma container opacity fontSize graphical phone;
|
||||||
inherit (nix-config.packages.${pkgs.system}) aleo-fonts;
|
inherit (nix-config.packages.${pkgs.system}) aleo-fonts;
|
||||||
inherit (pkgs) phinger-cursors noto-fonts-cjk-sans maple-mono noto-fonts-emoji;
|
inherit (pkgs) phinger-cursors noto-fonts-cjk-sans maple-mono noto-fonts-emoji;
|
||||||
inherit (builtins) attrValues;
|
inherit (builtins) attrValues;
|
||||||
@ -34,7 +34,6 @@ in
|
|||||||
plasma = mkEnableOption "Plasma specialization";
|
plasma = mkEnableOption "Plasma specialization";
|
||||||
container = mkEnableOption "disable some options for container performance";
|
container = mkEnableOption "disable some options for container performance";
|
||||||
graphical = mkEnableOption "xserver for graphical containers";
|
graphical = mkEnableOption "xserver for graphical containers";
|
||||||
phosh = mkEnableOption "use phosh instead of hyprland";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
@ -53,7 +52,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
i18n.inputMethod = mkIf (!phosh) {
|
i18n.inputMethod = {
|
||||||
enabled = "fcitx5";
|
enabled = "fcitx5";
|
||||||
|
|
||||||
fcitx5 = {
|
fcitx5 = {
|
||||||
@ -71,21 +70,9 @@ in
|
|||||||
xserver = mkIf (!container || graphical) {
|
xserver = mkIf (!container || graphical) {
|
||||||
enable = true;
|
enable = true;
|
||||||
excludePackages = [ pkgs.xterm ];
|
excludePackages = [ pkgs.xterm ];
|
||||||
|
|
||||||
displayManager.lightdm.enable = mkIf phosh false;
|
|
||||||
|
|
||||||
desktopManager.phosh = mkIf phosh {
|
|
||||||
enable = true;
|
|
||||||
group = "users";
|
|
||||||
user = username;
|
|
||||||
|
|
||||||
phocConfig = {
|
|
||||||
xwayland = "immediate";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pipewire = mkIf (!phosh) {
|
pipewire = mkIf (!phone) {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
alsa = {
|
alsa = {
|
||||||
@ -96,7 +83,7 @@ in
|
|||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
greetd = mkIf (!container && !phosh) {
|
greetd = mkIf (!container) {
|
||||||
enable = true;
|
enable = true;
|
||||||
restart = false;
|
restart = false;
|
||||||
|
|
||||||
|
60
specializations/phosh.nix
Normal file
60
specializations/phosh.nix
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkForce;
|
||||||
|
inherit (config.modules.system) username;
|
||||||
|
inherit (builtins) attrValues;
|
||||||
|
|
||||||
|
transparency = "0.7";
|
||||||
|
getColorCh = colorName: channel: config.lib.stylix.colors."${colorName}-rgb-${channel}";
|
||||||
|
rgba = color: ''rgba(${getColorCh color "r"}, ${getColorCh color "g"}, ${getColorCh color "b"}, ${transparency})'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs.hyprland.enable = mkForce false;
|
||||||
|
i18n.inputMethod.enabled = mkForce null;
|
||||||
|
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 */ ''
|
||||||
|
phosh-lockscreen, .phosh-lockshield {
|
||||||
|
background-image: linear-gradient(${rgba "base00"}, ${rgba "base00"}), url('file:///home/${username}/wall-lock.jpg');
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
phosh-app-grid {
|
||||||
|
background-image: linear-gradient(${rgba "base00"}, ${rgba "base00"}), url('file:///home/${username}/wall-grid.jpg');
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
phosh-top-panel {
|
||||||
|
background-image: linear-gradient(${rgba "base00"}, ${rgba "base00"}), url('file:///home/${username}/wall-panel.jpg');
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
phosh-home {
|
||||||
|
background-image: linear-gradient(${rgba "base00"}, ${rgba "base00"}), url('file:///home/${username}/wall-home.jpg');
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user