blob: 65e705384b789bcc3f20053a4d6d25a08eb7b644 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
{ 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
'';
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;
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
'';
};
}
|