{ pkgs, config, lib, ... }: { imports = [ ./audio ./browser ./cursor ./frobar/module.nix ./lock ./mpd ./presentation ./screenshots ./sway ./terminal ]; config = lib.mkIf config.frogeye.desktop.xorg { wayland.windowManager.sway.enable = true; programs = { # Terminal bash.shellAliases = { lmms = "lmms --config ${config.xdg.configHome}/lmmsrc.xml"; }; rofi = { # TODO This theme template, that was used for Arch, looks much better: # https://gitlab.com/jordiorlando/base16-rofi/-/blob/master/templates/default.mustache enable = true; pass = { enable = true; package = pkgs.rofi-pass-wayland; }; extraConfig = { lazy-grab = false; matching = "regex"; }; }; mpv = { enable = true; config = { audio-display = false; save-position-on-quit = true; osc = false; # Required by thumbnail script # Hardware acceleration (from https://nixos.wiki/wiki/Accelerated_Video_Playback#MPV, vo=gpu already default) hwdec = "auto-safe"; profile = "gpu-hq"; }; scripts = with pkgs.mpvScripts; [ thumbnail mpris ]; scriptOpts = { mpv_thumbnail_script = { autogenerate = false; # TODO It creates too many processes at once, crashing the system cache_directory = "/tmp/mpv_thumbs_${config.home.username}"; mpv_hwdec = "auto-safe"; }; }; }; }; xdg = { userDirs = let wellKnownUserDirs = [ "desktop" "documents" "download" "music" "pictures" "publicShare" "templates" "videos" ]; wellKnownUserDirsNulled = builtins.listToAttrs ( builtins.map (name: { inherit name; value = null; }) wellKnownUserDirs ); allFolders = builtins.attrValues config.frogeye.folders; folders = builtins.filter ( folder: folder.xdgUserDirVariable != null && folder.user == config.home.username ) allFolders; in { enable = true; createDirectories = true; extraConfig = builtins.listToAttrs ( builtins.map (folder: { name = folder.xdgUserDirVariable; value = "${config.home.homeDirectory}/${folder.path}"; }) folders ); } // wellKnownUserDirsNulled; # Don't use defaults dirs }; services = { blueman-applet.enable = true; dunst = { enable = true; settings = with config.lib.stylix.colors.withHashtag; { global = { separator_color = lib.mkForce base05; idle_threshold = 120; markup = "full"; max_icon_size = 48; }; urgency_low = { background = lib.mkForce base01; foreground = lib.mkForce base03; frame_color = lib.mkForce base05; }; urgency_normal = { background = lib.mkForce base02; foreground = lib.mkForce base05; frame_color = lib.mkForce base05; }; urgency_critical = { background = lib.mkForce base08; foreground = lib.mkForce base06; frame_color = lib.mkForce base05; }; }; }; kanshi.enable = true; }; home = { file = { ".face" = { # TODO Only works on pindakaas? See https://wiki.archlinux.org/title/LightDM#Changing_your_avatar source = pkgs.runCommand "face.png" { } "${pkgs.inkscape}/bin/inkscape ${./face.svg} -w 1024 -o $out"; }; }; packages = with pkgs; [ # remote tigervnc # multimedia common gimp inkscape libreoffice jellyfin-media-player # Does not prevent the screen from sleeping jellyfin-mpv-shim # No UI, needs remote # data management freefilesync # misc gedit xfce.thunar nomacs feh zbar evince zathura meld python3Packages.magic bluetuith trayer # For occasional applications that want to put themselves in tray # wayland exclusive wl-clipboard # Easy copy/paste from/to terminal # TODO Clipboard history? wdisplays # Ad-hoc display setup GUI wf-recorder # Screen recorder (much more basic than simplescreenrecorder but alright) ]; sessionVariables = { # XAUTHORITY = "${config.xdg.configHome}/Xauthority"; # Disabled as this causes lock-ups with DMs }; }; }; }