2024-04-04 11:34:30 +02:00
|
|
|
{ pkgs, config, lib, ... }:
|
2023-06-11 15:51:26 +02:00
|
|
|
|
2024-04-04 11:34:30 +02:00
|
|
|
let
|
|
|
|
inherit (lib) mkEnableOption mkIf;
|
2024-01-13 06:38:42 +01:00
|
|
|
|
2024-04-04 11:34:30 +02:00
|
|
|
cfg = config.modules.desktop;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
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-01-13 06:38:42 +01:00
|
|
|
};
|
2023-06-17 15:42:47 +02:00
|
|
|
|
2024-04-04 14:11:11 +02:00
|
|
|
config = with cfg; {
|
2024-04-04 11:34:30 +02:00
|
|
|
programs.hyprland.enable = true;
|
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 05:02:44 +02:00
|
|
|
};
|
2024-04-04 05:09:28 +02:00
|
|
|
|
2024-04-04 11:34:30 +02:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
pulseaudio
|
2024-04-04 14:11:11 +02:00
|
|
|
anki
|
|
|
|
kanjidraw
|
|
|
|
logseq
|
|
|
|
mullvad-browser
|
|
|
|
spek
|
|
|
|
audacity
|
|
|
|
gimp
|
|
|
|
sqlitebrowser
|
|
|
|
qdirstat
|
|
|
|
libreoffice
|
|
|
|
krita
|
|
|
|
element-desktop
|
|
|
|
signal-desktop
|
|
|
|
ungoogled-chromium
|
|
|
|
qbittorrent
|
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 = {
|
|
|
|
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland";
|
|
|
|
user = "greeter";
|
|
|
|
};
|
|
|
|
|
|
|
|
initial_session = {
|
|
|
|
command = "${pkgs.hyprland}/bin/Hyprland";
|
|
|
|
user = "user";
|
|
|
|
};
|
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
|
|
|
};
|
|
|
|
};
|
2023-05-17 01:10:15 +02:00
|
|
|
}
|