2024-08-03 20:40:07 +02:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
2023-06-11 15:51:26 +02:00
|
|
|
|
2024-04-04 11:34:30 +02:00
|
|
|
let
|
2024-06-15 16:46:45 +02:00
|
|
|
inherit (config.modules.system) username;
|
2024-09-01 20:31:45 +02:00
|
|
|
inherit (config.boot) isContainer;
|
2024-04-04 17:00:17 +02:00
|
|
|
|
2024-08-03 20:40:07 +02:00
|
|
|
inherit (lib)
|
|
|
|
mkEnableOption
|
|
|
|
mkIf
|
|
|
|
mkMerge
|
|
|
|
;
|
|
|
|
|
2024-09-08 06:41:58 +02:00
|
|
|
inherit (cfg) bloat;
|
2024-08-03 20:40:07 +02:00
|
|
|
|
2024-10-10 20:20:23 +02:00
|
|
|
isPhone = config.programs.calls.enable;
|
|
|
|
|
2024-04-04 11:34:30 +02:00
|
|
|
cfg = config.modules.desktop;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.modules.desktop = {
|
2024-05-28 21:22:25 +02:00
|
|
|
bloat = mkEnableOption "GUI applications";
|
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-10-10 20:20:23 +02:00
|
|
|
hardware.graphics.enable32Bit = mkIf (!isPhone) true;
|
2024-04-04 18:19:41 +02:00
|
|
|
|
2024-04-04 16:13:02 +02:00
|
|
|
programs = {
|
2024-10-10 20:20:23 +02:00
|
|
|
hyprland.enable = mkIf (!isContainer && !isPhone) true;
|
|
|
|
cdemu.enable = mkIf (!isPhone) true;
|
2024-04-04 16:13:02 +02:00
|
|
|
|
2024-07-15 17:37:30 +02:00
|
|
|
thunar = {
|
2024-10-10 20:20:23 +02:00
|
|
|
enable = mkIf (!isPhone) true;
|
2024-04-05 19:28:23 +02:00
|
|
|
|
2024-09-05 18:11:43 +02:00
|
|
|
plugins = with pkgs.xfce; [
|
|
|
|
thunar-volman
|
|
|
|
];
|
2024-04-04 16:13:02 +02:00
|
|
|
};
|
|
|
|
};
|
2023-05-17 15:23:38 +02:00
|
|
|
|
2024-10-10 20:20:23 +02:00
|
|
|
i18n.inputMethod = mkIf (!isPhone) {
|
2024-07-16 18:25:04 +02:00
|
|
|
enable = true;
|
|
|
|
type = "fcitx5";
|
2024-04-04 03:39:13 +02:00
|
|
|
|
2024-04-04 11:34:30 +02:00
|
|
|
fcitx5 = {
|
|
|
|
waylandFrontend = true;
|
2024-09-05 18:11:43 +02:00
|
|
|
|
2024-11-20 22:47:46 +01:00
|
|
|
addons = with pkgs; [
|
2024-09-05 18:11:43 +02:00
|
|
|
fcitx5-mozc
|
|
|
|
];
|
2024-04-04 11:34:30 +02:00
|
|
|
};
|
|
|
|
};
|
2024-04-04 03:39:13 +02:00
|
|
|
|
2024-04-04 14:11:11 +02:00
|
|
|
services = {
|
2024-10-10 20:20:23 +02:00
|
|
|
udisks2 = mkIf (!isPhone) {
|
2024-04-04 14:11:11 +02:00
|
|
|
enable = true;
|
|
|
|
mountOnMedia = true;
|
|
|
|
};
|
2024-04-04 05:02:44 +02:00
|
|
|
|
2024-08-29 07:39:40 +02:00
|
|
|
libinput = {
|
|
|
|
touchpad = {
|
|
|
|
naturalScrolling = true;
|
|
|
|
accelProfile = "flat";
|
|
|
|
accelSpeed = "0.75";
|
|
|
|
};
|
|
|
|
|
|
|
|
mouse = {
|
|
|
|
accelProfile = "flat";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-09-01 22:33:04 +02:00
|
|
|
xserver = mkIf (!isContainer) {
|
2024-04-04 11:34:30 +02:00
|
|
|
enable = true;
|
2024-08-03 20:40:07 +02:00
|
|
|
excludePackages = with pkgs; [ xterm ];
|
2024-08-29 07:39:40 +02:00
|
|
|
|
2024-09-09 19:24:50 +02:00
|
|
|
displayManager.startx.enable = true;
|
2024-04-04 05:02:44 +02:00
|
|
|
};
|
|
|
|
|
2024-10-10 20:20:23 +02:00
|
|
|
pipewire = mkIf (!isPhone) {
|
2024-04-04 14:11:11 +02:00
|
|
|
enable = true;
|
|
|
|
|
|
|
|
alsa = {
|
|
|
|
enable = true;
|
2024-07-15 17:37:30 +02:00
|
|
|
support32Bit = true;
|
2024-04-04 14:11:11 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
pulse.enable = true;
|
|
|
|
};
|
2024-04-04 16:13:02 +02:00
|
|
|
|
2024-10-10 20:20:23 +02:00
|
|
|
greetd = mkIf (!isContainer && !isPhone) {
|
2024-04-11 11:34:49 +02:00
|
|
|
enable = true;
|
|
|
|
restart = false;
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
default_session = {
|
|
|
|
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland --time-format '%F %R'";
|
|
|
|
user = "greeter";
|
|
|
|
};
|
|
|
|
|
|
|
|
initial_session = {
|
2024-07-15 17:37:30 +02:00
|
|
|
command = "${pkgs.hyprland}/bin/Hyprland";
|
2024-04-11 11:34:49 +02:00
|
|
|
user = username;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-04-04 16:13:02 +02:00
|
|
|
tumbler.enable = true;
|
|
|
|
gvfs.enable = true;
|
|
|
|
gnome.gnome-keyring.enable = true;
|
2024-05-13 17:04:41 +02:00
|
|
|
upower.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 [
|
2024-08-27 03:32:55 +02:00
|
|
|
(mkIf bloat (
|
|
|
|
with pkgs;
|
|
|
|
[
|
|
|
|
mullvad-browser
|
|
|
|
spek
|
|
|
|
audacity
|
|
|
|
gimp
|
|
|
|
libreoffice
|
|
|
|
element-desktop
|
|
|
|
signal-desktop
|
|
|
|
qbittorrent
|
|
|
|
popsicle
|
|
|
|
satty
|
|
|
|
srb2
|
|
|
|
ringracers
|
|
|
|
jamesdsp
|
|
|
|
texliveFull
|
|
|
|
]
|
|
|
|
))
|
2024-08-25 23:03:37 +02:00
|
|
|
|
|
|
|
(with pkgs; [
|
2024-11-17 04:48:41 +01:00
|
|
|
anki
|
2024-08-25 23:03:37 +02:00
|
|
|
pulseaudio
|
|
|
|
grim
|
|
|
|
wl-clipboard-rs
|
|
|
|
])
|
2024-04-04 05:09:28 +02:00
|
|
|
];
|
|
|
|
};
|
2023-05-17 01:10:15 +02:00
|
|
|
}
|