Clean up some secret management stuff

This commit is contained in:
Natsu Kagami 2024-06-02 18:03:23 +02:00
parent 74ad74af1f
commit 37d8642ed9
Signed by: nki
GPG key ID: 55A032EB38B49ADB
3 changed files with 16 additions and 22 deletions

View file

@ -1,5 +1,16 @@
{ pkgs, config, lib, ... }:
with lib; {
with lib;
let
kwallet = { pkgs, lib, ... }: {
home.packages = with pkgs; [ kdePackages.kwallet kdePackages.ksshaskpass ];
home.sessionVariables = {
# https://wiki.archlinux.org/title/KDE_Wallet#Using_the_KDE_Wallet_to_store_ssh_key_passphrases
SSH_ASKPASS = lib.getExe pkgs.kdePackages.ksshaskpass;
SSH_ASKPASS_REQUIRE = "prefer";
};
};
in
{
imports = [
./modules/monitors.nix
./modules/linux/graphical
@ -12,22 +23,13 @@ with lib; {
file # Query file type
nix-output-monitor
pinentry-gnome3
pinentry-qt
# Java stuff
jdk21
sbt
];
## Gnome-keyring
services.gnome-keyring = {
enable = true;
components = [ "pkcs11" "secrets" "ssh" ];
};
# services.gpg-agent.enable = true;
# services.gpg-agent.pinentryFlavor = "curses";
# services.gpg-agent.enableSshSupport = true;
# Git "safe-directory"
programs.git.extraConfig.safe.directory = [
"${config.home.homeDirectory}/.config/nixpkgs"

View file

@ -151,8 +151,8 @@ in
# Sway!
if status --is-login; and test -z $DISPLAY; and test (tty) = "/dev/tty1"
${bootDesktop}
if test $status -ne 255
exit $status
if test $status -eq 0
exit 0
end
end

View file

@ -344,12 +344,10 @@ in
swaynag.enable = true;
# Environment Variables
extraSessionCommands = ''
export MOZ_ENABLE_WAYLAND=1
export SDL_VIDEODRIVER=wayland
export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
export QT_IM_MODULE=fcitx
# export NIXOS_OZONE_WL=1 # Yeah this fucks up IMEs
# export NIXOS_OZONE_WL=1 # Until text-input is merged
'' + (if config.services.gnome-keyring.enable then ''
# gnome-keyring
@ -389,12 +387,6 @@ in
'' + ''
# Enable portal stuff
exec ${pkgs.writeShellScript "start-portals.sh" ''
# Import the WAYLAND_DISPLAY env var from sway into the systemd user session.
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
# Stop any services that are running, so that they receive the new env var when they restart.
systemctl --user stop pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
systemctl --user start pipewire-media-session
''}
'';
};