Browse Source

some of my xdg ocd calmed down

rework-profiles
parent
commit
af7e729f72
Signed by: govanify GPG Key ID: DE62E1E2A6145556
2 changed files with 16 additions and 19 deletions
  1. +1
    -1
      common/graphical.nix
  2. +15
    -18
      common/xdg.nix

+ 1
- 1
common/graphical.nix View File

@ -76,7 +76,7 @@
mkdir -p ~/.local/share/mail/ &> /dev/null
mkdir -p ~/.cache/mutt/ &> /dev/null
fi
if [ ! -f ~/.config/pass ] && [[ $(tty) = /dev/tty1 ]]; then
if [ ! -d ~/.config/pass ] && [[ $(tty) = /dev/tty1 ]]; then
# we try to clone user passwords, network might not be started or
# unreliable yet so we just try to clone until it works
~/.cache/clone-pass.sh &


+ 15
- 18
common/xdg.nix View File

@ -11,7 +11,21 @@
# * steam: done BUT need to start through startsteam, might want to modify
# that(ie modify desktop file)
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
with pkgs;
let
# ssh devs don't want to make ssh XDG compliant? well let's roll our own
# compliance!
ssh-xdg = openssh.overrideAttrs (oldAttrs: rec {
postPatch = oldAttrs.postPatch + ''
sed -i 's/\.ssh/\.config\/ssh/' $(grep -Rl '"\.ssh"')
'';
});
in
{
environment.systemPackages = with pkgs; [
ssh-xdg
];
environment.variables = {
XDG_CONFIG_HOME = "$HOME/.config";
@ -40,21 +54,4 @@
home.file.".config/wgetrc".source = ./../dotfiles/xdg/wgetrc;
home.file.".config/python/startup.py".source = ./../dotfiles/xdg/python/startup.py;
};
# ssh devs don't want to make ssh XDG compliant? well let's roll our own
# compliance!
# a thing to note: XDG are not parsed yet so we have to make it like this
programs.ssh.extraConfig = ''
IdentityFile ~/.config/ssh/id_dsa
IdentityFile ~/.config/ssh/id_ecdsa
IdentityFile ~/.config/ssh/id_ed25519
IdentityFile ~/.config/ssh/id_rsa
UserKnownHostsFile ~/.config/ssh/known_hosts
'';
# TODO: after all that ssh STILL tries to create the ~/.ssh folder. We need to
# execute the following command in override postpatch of ssh
# sed -i 's/\.ssh/\.config\/ssh/' *pathnames.h
}

Loading…
Cancel
Save