Browse Source

some more xdg work

rework-profiles
parent
commit
4398e3e0d0
Signed by: govanify GPG Key ID: DE62E1E2A6145556
4 changed files with 35 additions and 27 deletions
  1. +5
    -5
      README.md
  2. +0
    -3
      common/headfull.nix
  3. +30
    -17
      common/xdg.nix
  4. +0
    -2
      pkgs/zsh.nix

+ 5
- 5
README.md View File

@ -8,13 +8,13 @@ Currently the machines populated by this configuration are:
* xanadu
Features in need of development are:
TODo list sorted by priority:
* security: redirect IPv6 through tor
* workflow: weechat-matrix and vim-prosession
* mail: make your replies appear in threads
* mail: make gpg less shobby(auto gather from sks, check why keyid does not work when encrypting
* xdg: ssh, mozc, dbus override, nixpkgs PR
* security: redirect IPv6 through tor
* security: security hardening through sandboxing
* workflow: weechat-matrix and vim-prosession !!!
* locale: fix ibus daemon
* security: security hardening through sandboxing
* workflow: set up patchouli to have regular and automated backups
* server: make firefox sync to fujiwara and setup fujiwara
* xdg: nixpkgs PR, mozilla PR or source patch if too slow

+ 0
- 3
common/headfull.nix View File

@ -33,9 +33,6 @@
# firmwares + steam et al
nixpkgs.config.allowUnfree = true;
# uneeded in most cases and create an ~/.esd_auth file
hardware.pulseaudio.extraConfig = "unload-module module-esound-protocol-unix";
# we do not use gpg agent as all gpg keys used are available _without_ a
# password, if someone is able to snoop into my user files they will sooner
# or later get the password anyways


+ 30
- 17
common/xdg.nix View File

@ -1,31 +1,44 @@
# TODO: currently non compliant to XDG in default config are:
# * mozilla (in progress upstream hopefully)
# * nix old folders, yuuuuup, i should make a PR
# * dbus: ~/.dbus in root
# https://github.com/google/mozc/issues/474
# ^ mozc wise
# TODO: dbus esd_auth gets removed each time you start a new shell, should be done
# upon user login along with swaystart
# * steam: done BUT need to start through startsteam, might want to modify
# that(ie modify desktop file)
{ config, pkgs, ... }:
with pkgs;
let
{ config, pkgs, ... }: {
# 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
];
nixpkgs.config.packageOverrides = pkgs: {
openssh = pkgs.openssh.overrideAttrs (oldAttrs: rec {
postPatch = oldAttrs.postPatch + ''
sed -i 's/\.ssh/\.config\/ssh/' $(grep -Rl '"\.ssh"')
'';
});
# https://github.com/google/mozc/issues/474
# hopefully temporary
ibus-mozc = pkgs.ibus-mozc.overrideAttrs (oldAttrs: rec {
postPatch = oldAttrs.postPatch + ''
sed -i 's/\.mozc/\.config\/mozc/' $(grep -Rl '"\.mozc"')
'';
});
# rarely created on my setup, seems to be x11 related? either way here we go
dbus = pkgs.dbus.overrideAttrs (oldAttrs: rec {
postPatch = oldAttrs.postPatch + ''
sed -i 's/\.dbus/\.config\/dbus/' $(grep -Rl '"\.dbus"')
'';
});
pulseaudio = pkgs.pulseaudio.overrideAttrs (oldAttrs: rec {
postPatch = oldAttrs.postPatch + ''
sed -i 's/\.esd_auth/\.config\/esd_auth/' $(grep -Rl '"\.esd_auth"')
'';
});
};
environment.variables = {
XDG_CONFIG_HOME = "$HOME/.config";


+ 0
- 2
pkgs/zsh.nix View File

@ -10,11 +10,9 @@
histFile = "$XDG_DATA_HOME/zsh/history";
# we unloaded the pulseaudio module already so this file shouldn't be used
# after startup. VERY hacky but oh well
# TODO: apparmor for pulseaudio
interactiveShellInit = ''
mkdir -p $XDG_DATA_HOME/zsh &> /dev/null
compinit -d $XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION
rm $HOME/.esd_auth &> /dev/null
'';
};
}

Loading…
Cancel
Save