{ config, pkgs, lib, inputs, ... }: { systemd.user.startServices = false; programs.zsh.profileExtra = '' if [ -f "$HOME/.guix-home/setup-environment" ]; then HOME_ENVIRONMENT="$HOME/.guix-home" . "$HOME_ENVIRONMENT/setup-environment" "$HOME_ENVIRONMENT/on-first-login" unset HOME_ENVIRONMENT fi # /etc/profile normally puts ~/.config/guix/current (the guix pull # profile with our actual channels: nonguix, rosenthal, ...) ahead of # /run/current-system/profile on PATH, but that only happens for bash # login shells -- zsh never sources /etc/profile. Without this, `guix` # resolves to the bare system profile's guix, which doesn't know about # our channels. if [ -d "$HOME/.config/guix/current" ]; then export PATH="$HOME/.config/guix/current/bin:$PATH" export INFOPATH="$HOME/.config/guix/current/share/info''${INFOPATH:+:}$INFOPATH" fi ''; dconf.enable = false; wayland.windowManager.hyprland.extraConfig = '' exec-once = sh -c 'gpgconf --launch gpg-agent; hyprctl setenv SSH_AUTH_SOCK "$(gpgconf --list-dirs agent-ssh-socket)"' ''; programs.gpg.scdaemonSettings.disable-ccid = true; # Guix needs a special fonts.conf file in the user env since it doesn't # have one in /etc/fonts/fonts.conf from nixos xdg.configFile."fontconfig-nix/fonts.conf".text = '' ${pkgs.fontconfig.out}/etc/fonts/conf.d ${config.home.homeDirectory}/.config/fontconfig/conf.d ${config.home.homeDirectory}/.guix-home/profile/share/fonts ${config.home.homeDirectory}/.cache/fontconfig ''; home.sessionVariables.FONTCONFIG_FILE = "${config.home.homeDirectory}/.config/fontconfig-nix/fonts.conf"; home.packages = [ (pkgs.writeScriptBin "hyprlock" '' #! ${pkgs.bash}/bin/bash export LD_PRELOAD="/run/current-system/profile/lib/libpam.so.0:$LD_PRELOAD" exec ${pkgs.hyprlock}/bin/hyprlock "$@" '') # Guix's mesa doesn't match nixpkgs', so GL apps built by nix need nixGL. inputs.nixgl.packages.${pkgs.stdenv.hostPlatform.system}.nixGLIntel ]; # We need to correct the ssh config file's permissions on guix # Remove the symlink and just install the store file directly home.activation = { fixSshPermissions = lib.hm.dag.entryAfter [ "linkGeneration" ] '' run install -d -m 0700 "$HOME/.ssh" if [ -L "$HOME/.ssh/config" ]; then src="$(readlink -f "$HOME/.ssh/config")" run rm -f "$HOME/.ssh/config" run install -m 0600 "$src" "$HOME/.ssh/config" fi ''; }; }