nixos/home/desktop/default.nix
Evie Litherland-Smith 05d19c1813 Add plasma config back, reconfigure to coexist with sway config
Split system-level sway and plasma config into separate files, move
sway-specific home-level config to sway file. Only truly common
desktop components are kept in common spaces. This allows much easier
switching between using KDE Plasma and Sway.
2024-07-10 08:27:17 +01:00

126 lines
3.1 KiB
Nix

{
config,
lib,
pkgs,
accentColourName,
...
}: {
imports = [./alacritty/default.nix];
home = {
pointerCursor = let
name =
if config.scheme.variant == "light"
then "volantes_cursors"
else "volantes_light_cursors";
in {
inherit name;
package = pkgs.volantes-cursors;
size = 32;
gtk.enable = true;
x11 = {
enable = true;
defaultCursor = name;
};
};
packages = with pkgs; [
libreoffice-fresh
inkscape
webcord
teams-for-linux
];
};
services.syncthing.enable = true;
programs.mpv.enable = true;
gtk = let
extraCss = import ./base16/gtk.nix {
inherit (config) scheme;
inherit accentColourName;
};
toCapital = string:
with lib; let
chars = let
lc = strings.splitString "" string;
in (lists.sublist 1 (lists.length lc - 2) lc);
in (
strings.concatStringsSep "" (
(lists.singleton (strings.toUpper (lists.elemAt chars 0)))
++ (lists.sublist 1 (lists.length chars) chars)
)
);
in {
enable = true;
gtk3 = {inherit extraCss;};
gtk4 = {inherit extraCss;};
theme = let
color = "purple";
in {
package = pkgs.colloid-gtk-theme.override {
themeVariants = [color];
colorVariants = [config.scheme.variant];
};
name = "Colloid-${toCapital color}-${toCapital config.scheme.variant}";
};
iconTheme = let
color = "breeze";
in {
package = pkgs.papirus-icon-theme.override {inherit color;};
name = "Papirus-${toCapital config.scheme.variant}";
};
};
# qt = {
# enable = true;
# style.name = "breeze";
# };
xdg = {
mime.enable = true;
mimeApps = let
defaultApplications = import ./mimeapps.nix;
in {
enable = true;
inherit defaultApplications;
associations = {
added = defaultApplications;
removed = {
"x-scheme-handler/zoomus" = config.xdg.mimeApps.defaultApplications."x-scheme-handler/http";
};
};
};
userDirs = {
enable = true;
createDirectories = true;
extraConfig = {
XDG_PROJECTS_DIR = "${config.home.homeDirectory}/Projects";
};
};
configFile."teams-for-linux/config.json".text = builtins.toJSON {
awayOnSystemIdle = true;
closeAppOnCross = true;
followSystemTheme = true;
electronCLIFlags = lib.mkIf config.wayland.windowManager.sway.enable [["ozone-platform" "wayland"]];
notificationMethod = "electron";
optInTeamsV2 = true;
spellCheckerLanguages = ["en_GB"];
};
};
xresources.properties = with config.scheme.withHashtag; {
"*background" = base00;
"*foreground" = base05;
"*color0" = base00;
"*color1" = red;
"*color2" = green;
"*color3" = yellow;
"*color4" = blue;
"*color5" = magenta;
"*color6" = cyan;
"*color7" = base04;
"*color8" = base01;
"*color9" = red;
"*color10" = green;
"*color11" = yellow;
"*color12" = blue;
"*color13" = magenta;
"*color14" = cyan;
"*color15" = base05;
};
}