2024-04-05 16:09:51 +02:00
|
|
|
{ nix-config, pkgs, config, lib, ... }:
|
2023-06-11 15:51:26 +02:00
|
|
|
|
2024-04-04 11:34:30 +02:00
|
|
|
let
|
2024-04-05 02:05:08 +02:00
|
|
|
inherit (lib) mkEnableOption mkIf mkMerge;
|
2024-04-04 22:36:08 +02:00
|
|
|
inherit (config.modules.system) username;
|
2024-04-06 14:30:32 +02:00
|
|
|
inherit (cfg) japanese bloat wine gnome plasma;
|
2024-04-05 13:04:22 +02:00
|
|
|
inherit (builtins) attrValues;
|
2024-04-05 19:28:23 +02:00
|
|
|
inherit (nix-config.packages.${pkgs.system}) aleo-fonts;
|
2024-01-13 06:38:42 +01:00
|
|
|
|
2024-04-04 17:00:17 +02:00
|
|
|
theme = "monokai";
|
|
|
|
opacity = 0.95;
|
|
|
|
font-size = 11;
|
|
|
|
|
2024-04-04 11:34:30 +02:00
|
|
|
cfg = config.modules.desktop;
|
|
|
|
in
|
|
|
|
{
|
2024-04-05 15:36:21 +02:00
|
|
|
imports = attrValues {
|
2024-04-05 16:09:51 +02:00
|
|
|
inherit (nix-config.inputs.home-manager.nixosModules) home-manager;
|
|
|
|
inherit (nix-config.inputs.stylix.nixosModules) stylix;
|
2024-04-05 15:36:21 +02:00
|
|
|
};
|
|
|
|
|
2024-04-04 11:34:30 +02:00
|
|
|
options.modules.desktop = {
|
2024-04-04 14:11:11 +02:00
|
|
|
japanese = mkEnableOption "Japanese support (fcitx, anki, kanjidraw, etc.)";
|
|
|
|
bloat = mkEnableOption "GUI applications like Logseq";
|
2024-04-04 18:19:41 +02:00
|
|
|
wine = mkEnableOption "wine support";
|
2024-04-06 14:30:32 +02:00
|
|
|
gnome = mkEnableOption "GNOME specialization";
|
|
|
|
plasma = mkEnableOption "Plasma specialization";
|
2024-01-13 06:38:42 +01:00
|
|
|
};
|
2023-06-17 15:42:47 +02:00
|
|
|
|
2024-04-05 02:05:08 +02:00
|
|
|
config = {
|
2024-04-04 18:19:41 +02:00
|
|
|
hardware.opengl.driSupport32Bit = mkIf wine true;
|
|
|
|
|
2024-04-04 16:13:02 +02:00
|
|
|
programs = {
|
|
|
|
hyprland.enable = true;
|
2024-04-04 18:19:41 +02:00
|
|
|
cdemu.enable = mkIf wine true;
|
2024-04-04 16:13:02 +02:00
|
|
|
|
|
|
|
thunar = {
|
|
|
|
enable = true;
|
2024-04-05 19:28:23 +02:00
|
|
|
|
2024-04-05 13:04:22 +02:00
|
|
|
plugins = attrValues {
|
|
|
|
inherit (pkgs.xfce) thunar-volman;
|
|
|
|
};
|
2024-04-04 16:13:02 +02:00
|
|
|
};
|
|
|
|
};
|
2023-05-17 15:23:38 +02:00
|
|
|
|
2024-04-04 14:11:11 +02:00
|
|
|
i18n.inputMethod = mkIf japanese {
|
2024-04-04 11:34:30 +02:00
|
|
|
enabled = "fcitx5";
|
2024-04-04 03:39:13 +02:00
|
|
|
|
2024-04-04 11:34:30 +02:00
|
|
|
fcitx5 = {
|
|
|
|
addons = with pkgs; [ fcitx5-mozc ];
|
|
|
|
waylandFrontend = true;
|
|
|
|
};
|
|
|
|
};
|
2024-04-04 03:39:13 +02:00
|
|
|
|
2024-04-04 14:11:11 +02:00
|
|
|
services = {
|
|
|
|
udisks2 = {
|
|
|
|
enable = true;
|
|
|
|
mountOnMedia = true;
|
|
|
|
};
|
2024-04-04 05:02:44 +02:00
|
|
|
|
2024-04-04 14:11:11 +02:00
|
|
|
xserver = {
|
2024-04-04 11:34:30 +02:00
|
|
|
enable = true;
|
2024-04-04 14:11:11 +02:00
|
|
|
excludePackages = [ pkgs.xterm ];
|
2024-04-04 05:02:44 +02:00
|
|
|
};
|
|
|
|
|
2024-04-04 14:11:11 +02:00
|
|
|
pipewire = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
alsa = {
|
|
|
|
enable = true;
|
|
|
|
support32Bit = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
pulse.enable = true;
|
|
|
|
};
|
2024-04-04 16:13:02 +02:00
|
|
|
|
|
|
|
tumbler.enable = true;
|
|
|
|
gvfs.enable = true;
|
|
|
|
gnome.gnome-keyring.enable = true;
|
2024-04-04 05:02:44 +02:00
|
|
|
};
|
2024-04-04 05:09:28 +02:00
|
|
|
|
2024-04-05 02:02:51 +02:00
|
|
|
environment.systemPackages = mkMerge [
|
|
|
|
(mkIf japanese (attrValues {
|
|
|
|
inherit (pkgs) anki kanjidraw;
|
|
|
|
}))
|
|
|
|
|
|
|
|
(mkIf bloat (attrValues {
|
|
|
|
inherit (pkgs)
|
|
|
|
logseq
|
|
|
|
mullvad-browser
|
|
|
|
spek
|
|
|
|
audacity
|
|
|
|
gimp
|
|
|
|
sqlitebrowser
|
|
|
|
qdirstat
|
|
|
|
libreoffice
|
|
|
|
krita
|
|
|
|
element-desktop
|
|
|
|
signal-desktop
|
|
|
|
ungoogled-chromium
|
|
|
|
qbittorrent
|
|
|
|
obs-studio
|
2024-04-06 16:19:02 +02:00
|
|
|
satty
|
|
|
|
aaaaxy
|
|
|
|
srb2
|
2024-04-05 17:26:22 +02:00
|
|
|
;
|
2024-04-05 02:02:51 +02:00
|
|
|
}))
|
|
|
|
|
2024-04-05 13:04:22 +02:00
|
|
|
(attrValues {
|
|
|
|
inherit (pkgs) pulseaudio glib;
|
|
|
|
inherit (pkgs.xfce) exo;
|
|
|
|
})
|
2024-04-04 05:09:28 +02:00
|
|
|
];
|
|
|
|
|
2024-04-04 11:34:30 +02:00
|
|
|
services.greetd = {
|
|
|
|
enable = true;
|
|
|
|
restart = false;
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
default_session = {
|
2024-04-05 13:13:07 +02:00
|
|
|
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland --time-format '%F %R'";
|
2024-04-04 11:34:30 +02:00
|
|
|
user = "greeter";
|
|
|
|
};
|
|
|
|
|
|
|
|
initial_session = {
|
|
|
|
command = "${pkgs.hyprland}/bin/Hyprland";
|
2024-04-04 22:36:08 +02:00
|
|
|
user = username;
|
2024-04-04 11:34:30 +02:00
|
|
|
};
|
2024-04-04 05:09:28 +02:00
|
|
|
};
|
2024-04-04 11:34:30 +02:00
|
|
|
};
|
2024-04-04 05:09:28 +02:00
|
|
|
|
2024-04-04 11:34:30 +02:00
|
|
|
fonts = {
|
|
|
|
enableDefaultPackages = false;
|
|
|
|
|
|
|
|
packages = with pkgs; [
|
|
|
|
noto-fonts
|
|
|
|
noto-fonts-cjk-sans
|
|
|
|
noto-fonts-cjk-serif
|
|
|
|
noto-fonts-emoji
|
|
|
|
maple-mono
|
|
|
|
font-awesome
|
|
|
|
nerdfonts
|
|
|
|
kanji-stroke-order-font
|
|
|
|
liberation_ttf
|
|
|
|
];
|
|
|
|
|
|
|
|
fontconfig = {
|
|
|
|
defaultFonts = {
|
|
|
|
serif = [ "Noto Serif CJK JP" "Noto Serif" ];
|
|
|
|
sansSerif = [ "Noto Sans CJK JP" "Noto Sans" ];
|
|
|
|
monospace = [ "Noto Sans Mono CJK JP" "Noto Sans Mono" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
allowBitmaps = false;
|
|
|
|
};
|
2024-04-04 05:09:28 +02:00
|
|
|
};
|
2024-04-06 01:01:41 +02:00
|
|
|
|
2024-04-04 17:00:17 +02:00
|
|
|
stylix = {
|
|
|
|
image = ../assets/wallpaper.png;
|
|
|
|
polarity = "dark";
|
|
|
|
base16Scheme = "${pkgs.base16-schemes}/share/themes/${theme}.yaml";
|
|
|
|
|
|
|
|
opacity = {
|
|
|
|
terminal = opacity;
|
|
|
|
popups = opacity;
|
|
|
|
};
|
|
|
|
|
|
|
|
cursor = with pkgs; {
|
|
|
|
package = phinger-cursors;
|
|
|
|
name = "phinger-cursors";
|
|
|
|
size = 24;
|
|
|
|
};
|
|
|
|
|
|
|
|
fonts = with pkgs; {
|
|
|
|
serif = {
|
2024-04-05 19:28:23 +02:00
|
|
|
package = aleo-fonts;
|
2024-04-04 17:00:17 +02:00
|
|
|
name = "Aleo";
|
|
|
|
};
|
|
|
|
|
|
|
|
sansSerif = {
|
|
|
|
package = noto-fonts-cjk-sans;
|
|
|
|
name = "Noto Sans CJK JP";
|
|
|
|
};
|
|
|
|
|
|
|
|
monospace = {
|
|
|
|
package = maple-mono;
|
|
|
|
name = "Maple Mono";
|
|
|
|
};
|
|
|
|
|
|
|
|
emoji = {
|
|
|
|
package = noto-fonts-emoji;
|
|
|
|
name = "Noto Color Emoji";
|
|
|
|
};
|
|
|
|
|
|
|
|
sizes = {
|
|
|
|
applications = font-size;
|
|
|
|
desktop = font-size;
|
|
|
|
popups = font-size;
|
|
|
|
terminal = font-size;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-04-06 14:30:32 +02:00
|
|
|
|
|
|
|
specialisation = {
|
2024-04-06 15:44:16 +02:00
|
|
|
gnome = mkIf gnome {
|
|
|
|
configuration.imports = [ ../specializations/gnome.nix ];
|
|
|
|
};
|
|
|
|
|
|
|
|
plasma = mkIf plasma {
|
|
|
|
configuration.imports = [ ../specializations/plasma.nix ];
|
|
|
|
};
|
2024-04-06 14:30:32 +02:00
|
|
|
};
|
2024-04-04 05:09:28 +02:00
|
|
|
};
|
2023-05-17 01:10:15 +02:00
|
|
|
}
|