nix/os-mods/desktop/default.nix

114 lines
2.8 KiB
Nix
Raw Permalink Normal View History

2025-02-24 17:26:11 +01:00
{ config
, lib
, pkgs
, ...
}: {
programs.dconf.enable = true;
programs.partition-manager.enable = true;
fonts = {
enableDefaultPackages = true;
fontDir.enable = true;
fontconfig = {
antialias = true;
defaultFonts = {
serif = [ "Iosevka Nerd Font Propo" ];
sansSerif = [ "Iosevka Nerd Font Propo" ];
monospace = [ "Iosevka Nerd Font Mono" ];
emoji = [ "Noto Color Emoji" ];
};
hinting.enable = true;
hinting.style = "slight";
subpixel.rgba = lib.mkDefault "rgb";
subpixel.lcdfilter = "default";
};
packages = with pkgs; [
emacs-all-the-icons-fonts
corefonts
vistafonts
noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji
liberation_ttf
fira
fira-code
fira-code-symbols
mplus-outline-fonts.githubRelease
dina-font
proggyfonts
];
};
networking.firewall = {
enable = true;
allowedTCPPortRanges = [
{
from = 1714;
to = 1764;
} # KDE Connect
];
allowedUDPPortRanges = [
{
from = 1714;
to = 1764;
} # KDE Connect
];
};
programs.kdeconnect.enable = true;
programs.kclock.enable = true;
programs.sniffnet.enable = true;
security.pam.services = {
# sddm.kwallet.enable = true; useless due to tty as dm
kdewallet.kwallet.enable = true;
kdewallet.kwallet.forceRun = true; # tty as dm support
};
services = {
desktopManager.plasma6.enable = true;
desktopManager.plasma6.enableQt5Integration = true;
displayManager.enable = true;
xserver = {
enable = true;
xkb = {
layout = "us";
variant = "alt-intl";
};
};
greetd = {
enable = true;
settings = {
default_session = {
command = ''
${lib.getExe pkgs.greetd.tuigreet} \
--asterisks --asterisks-char \
--greeting "Welcome to NixOS ${config.system.nixos.version} (${config.system.nixos.codeName}) on ${config.system.name}!" \
--theme "border=magenta;text=cyan;prompt=green;time=red;action=blue;button=yellow;container=black;input=red" \
--time --time-format "%H:%M | %a %h | %F" \
--remember \
--cmd ${pkgs.writeShellScript "tuigreet-cmd.sh" ''
${pkgs.kdePackages.plasma-workspace}/libexec/plasma-dbus-run-session-if-needed
exec 2>/dev/null 1>/dev/null ${pkgs.kdePackages.plasma-workspace}/bin/startplasma-wayland
''};
'';
};
};
};
};
systemd.services.greetd.serviceConfig = {
Type = "idle";
StandardInput = "tty";
StandardOutput = "tty";
StandardError = "journal";
TTYReset = true;
TTYVHangup = true;
TTYVTDisallocate = true;
};
}