{ pkgs, lib, config, ... }: let inherit (import ./const.nix) fontSize homedir gpgid; inherit (import ./theme.nix { inherit pkgs lib; }) theme colors base16-scheme base16-scheme-filename xresourcesFile; xmonadPackages = self: [ self.xmonad-contrib #self.taffybar # fails to build self.xmonad-extras self.monad-logger ]; in { imports = [ ./common.nix # nix-channel --add https://github.com/catppuccin/nix/archive/main.tar.gz catppuccin # ]; home = { pointerCursor = { package = pkgs.phinger-cursors; name = "phinger-cursors"; x11.enable = true; }; keyboard.options = [ "caps:ctrl_modifier" ]; sessionVariables = { LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive"; }; file = { mutt = { text = (builtins.readFile ./muttrc) + (builtins.readFile ./mutt/solarized.muttrc); target = ".muttrc"; }; mailcap = { source = ./mailcap; target = ".mailcap"; }; xbindkeys = { source = ./xbindkeysrc; target = ".xbindkeysrc"; }; }; packages = with pkgs; [ acpi apvlv beets bind blueman cmdtree dict dmenu feh flameshot firefoxpwa gajim glibcLocales # rofi locale fix -- https://github.com/rycee/home-manager/issues/354#issuecomment-415914278 gnumake gnupg # keybase-gui libnotify lshw mplayer muchsync mumble nyxt pandoc pavucontrol pinentry tdesktop thunderbird # texlive.combined.scheme-full #tor-browser-bundle-bin usbutils vlc xbindkeys xclip xdotool xlayoutdisplay xorg.xmodmap xsel #xterm yank yt-dlp zathura ]; }; #catppuccin.flavor = "latte"; #catppuccin.enable = true; fonts.fontconfig.enable = true; fonts.fontconfig.defaultFonts.emoji = [ "Noto Color Emoji" ]; fonts.fontconfig.defaultFonts.monospace = [ "Fira Code" "Noto Color Emoji" ]; gtk.enable = false; # this fails because of some missing service file gtk.font.name = "Fira Sans"; gtk.font.size = fontSize; gtk.font.package = pkgs.fira; gtk.theme.name = "Breeze"; gtk.iconTheme.name = "hicolor"; gtk.cursorTheme.name = "breeze_cursors"; xresources = { properties = { #"XTerm*font" = "-*-FiraMono-medium-r-normal--${toString fontSize}-*-*-*-*-*-iso10646-1"; #"XTerm*faceName" = "FireMono"; #"XTerm*faceSize" = toString fontSize; #"XTerm*termName" = "xterm-256color"; #"XTerm*metaSendsEscape" = true; #"XTerm*utf8" = true; #"Xautolock.time:" = 1; #"Xautolock.locker:" = "xlock"; #"Xautolock.corners:" = "+0-0"; #"Xautolock.cornerdelay:" = 3; #"Xautolock.notify:" = 30; #"Xautolock.notifier:" = "notify-send -u critical -t 10000 -- 'Locking screen in 30 seconds'"; }; extraConfig = builtins.readFile xresourcesFile; }; services = { lorri.enable = false; emacs.enable = true; kbfs.enable = false; keybase.enable = false; dunst = { enable = true; settings = { global = { geometry = "320x5-10+30"; transparency = 0; frame_color = colors."${theme}".highlight; frame_width = 3; # same as xmonad border separator_color = "frame"; font = "Fira Sans"; background = colors."${theme}".background; foreground = colors."${theme}".foreground; padding = 10; horizontal_padding = 10; word_wrap = "yes"; markup = "full"; format = "%s\\n%b\\n"; }; urgency_normal = { background = colors."${theme}".background; foreground = colors."${theme}".foreground; timeout = 10; }; }; }; redshift = { enable = false; latitude = "40.80"; longitude = "-81.52"; temperature = { # orange = 1000, white = 5000 day = 5000; night = 1800; }; }; random-background = { enable = false; enableXinerama = true; imageDirectory = "%h/wallpaper"; interval = "30m"; }; gpg-agent = { defaultCacheTtl = 7200; # 2 hours enable = true; enableExtraSocket= true; enableScDaemon = true; # smart card support enableSshSupport = true; maxCacheTtl = 86400; # 24 hours pinentryPackage = pkgs.pinentry-all; verbose = true; extraConfig = '' allow-emacs-pinentry ''; #sshKeys = [ # "8278B6132877C1911B07814D94FC4F29DF23FCA4" #]; }; }; xsession = { enable = true; windowManager = { xmonad = { enable = true; extraPackages = xmonadPackages; enableContribAndExtras = true; config = ./xmonad.hs; }; }; }; programs.gpg = { enable = true; scdaemonSettings = { disable-ccid = true; card-timeout = "5"; }; }; programs = { git.signing.signByDefault = true; kitty = { enable = true; font = { name = "Fira Code"; size = 14; }; settings = { background_opacity = "0.95"; window_padding_width = 8; symbol_map = "U+1F600-U+1F64F,U+1F300-U+1F5FF,U+1F680-U+1F6FF,U+1F1E0-U+1F1FF,U+2600-U+26FF,U+2700-U+27BF,U+1F900-U+1F9FF,U+1FA00-U+1FA6F,U+1FA70-U+1FAFF,U+231A-U+231B,U+23E9-U+23F3,U+23F8-U+23FA,U+25AA-U+25AB,U+25B6,U+25C0,U+25FB-U+25FE,U+2614-U+2615,U+2648-U+2653,U+267F,U+2693,U+26A1,U+26AA-U+26AB,U+26BD-U+26BE,U+26C4-U+26C5,U+26CE,U+26D4,U+26EA,U+26F2-U+26F3,U+26F5,U+26FA,U+26FD,U+2702,U+2705,U+2708-U+270D,U+270F Noto Color Emoji"; # ef-dream inspired colors foreground = "#efd5c5"; background = "#232025"; cursor = "#f3c09a"; cursor_text_color = "#232025"; selection_foreground = "#232025"; selection_background = "#d0b0ff"; # black color0 = "#232025"; color8 = "#5b595e"; # red color1 = "#ff6f6f"; color9 = "#ff7a5f"; # green color2 = "#51b04f"; color10 = "#7fce5f"; # yellow color3 = "#c0b24f"; color11 = "#d09950"; # blue color4 = "#57b0ff"; color12 = "#80aadf"; # magenta color5 = "#ffaacf"; color13 = "#d0b0ff"; # cyan color6 = "#6fb3c0"; color14 = "#8fcfd0"; # white color7 = "#efd5c5"; color15 = "#f3c09a"; }; }; firefox = { enable = true; package = if lib.versionAtLeast config.home.stateVersion "19.09" then pkgs.firefox else pkgs.firefox-unwrapped; nativeMessagingHosts = [ pkgs.firefoxpwa pkgs.passff-host ]; }; qutebrowser = { enable = true; settings = { "colors.webpage.darkmode.enabled" = if theme == "dark" then true else false; "content.user_stylesheets" = "~/.userstyles.css"; # generated in common.nix # attempting to fix gl rendering "qt.force_software_rendering" = "qt-quick"; #"backend" = "webkit"; }; }; rofi = { enable = true; pass.enable = true; font = "Fira Code 14"; theme = let inherit (config.lib.formats.rasi) mkLiteral; in { "*" = { background-color = mkLiteral "#232025"; text-color = mkLiteral "#efd5c5"; border-color = mkLiteral "#d0b0ff"; }; "window" = { border = mkLiteral "2px"; padding = mkLiteral "20px"; }; "inputbar" = { children = mkLiteral "[prompt, textbox-prompt-colon, entry]"; padding = mkLiteral "8px"; }; "prompt" = { text-color = mkLiteral "#d0b0ff"; }; "textbox-prompt-colon" = { expand = false; str = ":"; margin = mkLiteral "0 0.3em 0 0"; text-color = mkLiteral "#8f8886"; }; "entry" = { placeholder = "search..."; placeholder-color = mkLiteral "#8f8886"; }; "listview" = { lines = 8; scrollbar = false; padding = mkLiteral "8px 0 0 0"; }; "element" = { padding = mkLiteral "8px"; }; "element selected" = { background-color = mkLiteral "#3b393e"; text-color = mkLiteral "#f3c09a"; }; "element-text" = { background-color = mkLiteral "inherit"; text-color = mkLiteral "inherit"; }; }; plugins = with pkgs; [ rofi-calc rofi-emoji rofi-file-browser rofi-menugen rofi-mpd rofi-pass rofi-systemd ]; }; }; systemd.user = { services = { #"gpg-refresh".Service.ExecStart = "${pkgs.gnupg}/bin/gpg --refresh"; # make it the same as 'systemctl show mpd | grep LimitMEMLOCK" # might not be necessary? #mpd.Service.LimitMEMLOCK = "2085444096"; }; timers = { #"gpg-refresh" = { # Install.WantedBy = ["timers.target"]; # Timer.OnCalendar = "daily"; #}; }; }; }