# enzo-only desktop extras. The shared niri/dark/audio/firefox base comes from # ../../profiles/desktop.nix (imported in ./default.nix); this file holds just # what's specific to the laptop. { pkgs, ... }: { # --- Fonts: enzo's monospace (base font packages come from the shared profile) --- fonts.fontconfig.defaultFonts.monospace = [ "Adwaita Mono" ]; # --- Shell state paths (cursor theme is shared — see ../../profiles/desktop.nix) --- environment.sessionVariables = { # TODO: move to dotfiles LESSHISTFILE = "$HOME/.local/state/lesshst"; HISTFILE = "$HOME/.local/state/bash_history"; }; nix.settings.use-xdg-base-directories = true; environment.systemPackages = with pkgs; [ yambar # text status bar xdg-user-dirs ]; # --- XDG user directories (~/Downloads, ~/Pictures, …) --- # Bare niri runs no desktop environment, so nothing generates # ~/.config/user-dirs.dirs on its own — Firefox downloads land in $HOME, the # GTK file chooser and Nautilus have a bare sidebar, and screenshot tools have # no Pictures default. This trims the default set (Templates/Publicshare # dropped — unused under niri) and runs the generator at login. environment.etc."xdg/user-dirs.defaults".text = '' DESKTOP=Desktop DOWNLOAD=Downloads DOCUMENTS=Documents MUSIC=Music PICTURES=Pictures VIDEOS=Videos ''; # A oneshot bound to graphical-session.target (the target niri-session brings # up — same hook swayidle uses). Before= makes the session wait for the dirs to # exist before apps start. GTK/GLib reads user-dirs.dirs directly, so no env # export is needed for the file to take effect. systemd.user.services.xdg-user-dirs-update = { description = "Create/update XDG user directories (~/Downloads, ~/Pictures, …)"; wantedBy = [ "graphical-session.target" ]; partOf = [ "graphical-session.target" ]; before = [ "graphical-session.target" ]; serviceConfig = { Type = "oneshot"; ExecStart = "${pkgs.xdg-user-dirs}/bin/xdg-user-dirs-update"; }; }; # --- Bar + wallpaper (was spawn-at-startup in the shared niri config.kdl) --- # The bar and wallpaper differ per host, so they live in nixos-config rather # than the stowed niri config. Long-running user services bound to # graphical-session.target (the target niri-session activates), same hook as # xdg-user-dirs-update above. systemd.user.services.yambar = { description = "yambar status bar"; wantedBy = [ "graphical-session.target" ]; partOf = [ "graphical-session.target" ]; after = [ "graphical-session.target" ]; # yambar runs on-click commands via execvp with no shell, so their # binaries must be on the service PATH. libnotify -> notify-send, # wireplumber -> wpctl (volume). Without this every on-click fails with # ENOENT ("No such file or directory"). path = [ pkgs.libnotify pkgs.wireplumber ]; serviceConfig = { ExecStart = "${pkgs.yambar}/bin/yambar"; Restart = "on-failure"; }; }; systemd.user.services.swaybg = { description = "swaybg wallpaper"; wantedBy = [ "graphical-session.target" ]; partOf = [ "graphical-session.target" ]; after = [ "graphical-session.target" ]; serviceConfig = { # Solid color (the old shared config's --image path pointed at # /home/henz, kusanagi's user, so enzo never had a valid image). Swap in # an enzo-local image path here if desired. ExecStart = "${pkgs.swaybg}/bin/swaybg --color '#24273a'"; Restart = "on-failure"; }; }; # --- User: desktop groups (niri essentials) --- users.users.hwebs.extraGroups = [ "audio" "input" ]; # --- Console / greeter font (HiDPI panel) --- # The eDP panel is high-density, so the kernel VT and tuigreet render with a # tiny 8x16 font. A large Terminus bitmap font makes the TTY and the greeter # legible; earlySetup applies it from initrd so it's big from the first frame. # Sizes: ter-v{16,18,20,22,24,28,32}n — bump/drop to taste. console = { earlySetup = true; packages = [ pkgs.terminus_font ]; font = "ter-v32n"; }; }