{ flake, userName, pkgs, customUtils, lib, config, ... }@inputs: let cfg = config.home-manager.users.${userName}; xmonad = import ./xmonad pkgs.haskellPackages; in { imports = with flake.nixosModules.userProfiles.${userName}; [ mpv ]; home-manager.users.${userName} = { programs = { ssh = { matchBlocks = import ./ssh-hosts.nix; # customUtils.recImport { dir = ./ssh-hosts; }; extraConfig = '' Match host uniworx3.ifi.lmu.de,uniworx4.ifi.lmu.de,uni2workgw.ifi.lmu.de,blackbeard.tcs.ifi.lmu.de,gitlab2.rz.ifi.lmu.de,oregon.tcs.ifi.lmu.de !exec "nc -z -w 1 %h %p &>/dev/null" ProxyJump gate ''; }; emacs = { enable = true; extraPackages = epkgs: with epkgs; [ evil evil-dvorak evil-magit undo-tree magit haskell-mode nix-mode yaml-mode json-mode shakespeare-mode smart-mode-line highlight-parentheses highlight-symbol notmuch ag sass-mode lua-mode fira-code-mode ]; }; firefox = { enable = true; profiles.default = { settings = { "layout.css.devPixelsPerPx" = "1.75"; "browser.tabs.drawInTitlebar" = false; "toolkit.legacyUserProfileCustomizations.stylesheets" = true; }; }; }; urxvt = { enable = true; package = pkgs.rxvt_unicode-with-plugins; fonts = [ "xft:FiraCode Nerd Font Mono:style=Regular:pixelsize=21" ]; scroll = { lines = 0; bar.enable = false; }; extraConfig = { urgentOnBell = false; print-pipe = "cat >/dev/null"; perl-ext-common = "52-osc,url-select"; "url-select.launcher" = "firefox"; "url-select.underline" = true; }; keybindings = { "M-u" = "perl:url-select:select_next"; }; }; zathura = { enable = true; package = pkgs.zathura.override { useMupdf = false; }; }; mpv.config = { demuxer-max-bytes = 1073741824; demuxer-max-back-bytes = 268435456; }; autorandr = { enable = true; hooks.postswitch = { # "restart-compton" = "${pkgs.systemd}/bin/systemctl --user try-restart picom"; "restart-trays" = '' ${pkgs.coreutils}/bin/sleep 5 ${pkgs.systemd}/bin/systemctl --user try-restart trayer xmobar ''; }; profiles = customUtils.recImport { dir = ./autorandr-profiles; }; }; zsh.initExtra = "source ${./zshrc}"; }; services = { dunst = { settings = import ./dunst-settings.nix; iconTheme = cfg.gtk.iconTheme; enable = true; }; emacs.enable = true; gpg-agent = { enable = true; enableSshSupport = true; extraConfig = '' pinentry-program ${pkgs.pinentry-gtk2}/bin/pinentry grab ''; }; pasystray.enable = true; udiskie = { enable = true; automount = false; }; unclutter = { enable = true; timeout = 5; }; network-manager-applet.enable = true; blueman-applet.enable = true; sxhkd = { enable = true; keybindings = { "button8" = "pacmd set-source-mute @DEFAULT_SOURCE@ 0"; "@button8" = "pacmd set-source-mute @DEFAULT_SOURCE@ 1"; "button9" = "pacmd set-sink-mute @DEFAULT_SINK@ 1"; "@button9" = "pacmd set-sink-mute @DEFAULT_SINK@ 0"; }; }; }; gtk = { enable = true; font.name = "DejaVu Sans 6"; theme = { package = pkgs.equilux-theme; name = "Equilux-compact"; }; iconTheme = { package = pkgs.paper-icon-theme; name = "Paper"; }; }; xsession = { enable = true; windowManager.command = "${xmonad}/bin/xmonad"; initExtra = let lockScript = pkgs.writeScript "lock" '' #!${pkgs.stdenv.shell} ${pkgs.playerctl}/bin/playerctl -a pause exec ${pkgs.xsecurelock}/bin/xsecurelock ''; in '' ${pkgs.coreutils}/bin/env XSECURELOCK_WANT_FIRST_KEYPRESS=1 XSECURELOCK_DIM_ALPHA=1 ${pkgs.xss-lock}/bin/xss-lock -l -n ${pkgs.xsecurelock}/libexec/xsecurelock/dimmer -- ${lockScript} & ${pkgs.xorg.xinput}/bin/xinput disable 'SynPS/2 Synaptics TouchPad' # Synaptics TM3512-010 ${pkgs.xorg.xset}/bin/xset s 590 10 ''; }; xresources.properties = import ./xresources.nix; home = { packages = with pkgs; [ fira-code powerline-fonts nerdfonts pavucontrol keepassxc youtube-dl sxiv xclip mumble pulseaudio-ctl libnotify synergy xorg.xbacklight screen-message pidgin-with-plugins google-play-music-desktop-player qt5ct playerctl evince thunderbird zulip zoom-us steam steam-run wireshark skype virt-manager rclone cached-nix-shell xournal discord xmonad worktime fira-code-symbols ]; file = { ".emacs".source = ./emacs.el; ".backup-munin".source = ./backup-patterns; ".mozilla/firefox/default/chrome/userChrome.css".source = ./firefox-chrome.css; ".mozilla/firefox/default/chrome/userContent.css".source = ./firefox-content.css; }; sessionVariables = { GDK_SCALE = 96.0 / 282.0; XDG_DATA_DIRS = "${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}:$XDG_DATA_DIRS"; QT_AUTO_SCREEN_SCALE_FACTOR = 1; QT_QPA_PLATFORMTHEME = "qt5ct"; }; stateVersion = "20.03"; }; fonts.fontconfig.enable = true; systemd.user = import ./systemd.nix inputs; }; }