feat(xonsh): set up ssh-agent

This commit is contained in:
Artur Manuel 2025-01-16 00:37:14 +00:00
commit 660c9089d4
11 changed files with 82 additions and 65 deletions

1
.envrc
View file

@ -1 +1,2 @@
# shellcheck disable=SC2148
use flake

8
flake.lock generated
View file

@ -516,11 +516,11 @@
"nvf": "nvf"
},
"locked": {
"lastModified": 1736860746,
"narHash": "sha256-ZULQd+0yda7ajs25krTpJJoqXn6kDEMRTh/jBhb6G6M=",
"lastModified": 1736875618,
"narHash": "sha256-Yqflnl+pJWtdFgMaiJAeNkgFHP4+o1vA0TC5KulhnaI=",
"ref": "master",
"rev": "8f5f5867bb22c5a4b6eef6f68d4f994bbd2dcc90",
"revCount": 14,
"rev": "e582f612654be987ca1bbeafb60de67f4b09e7d2",
"revCount": 15,
"type": "git",
"url": "https://codeberg.org/amadaluzia/painless-neovim.git"
},

View file

@ -100,6 +100,18 @@
};
};
devShells.default = config.pre-commit.devShell;
devShells.haskell = pkgs.mkShell {
name = "haskell";
packages = builtins.attrValues {
inherit (pkgs) ghc;
inherit
(pkgs.haskellPackages)
cabal-install
haskell-language-server
ormolu
;
};
};
formatter = pkgs.alejandra;
};
};

View file

@ -16,6 +16,7 @@
};
sessionVariables = {EDITOR = "nvim";};
};
alqueva = {
xonsh.enable = true;
libvirt.enable = true;

View file

@ -1,18 +1,19 @@
{pkgs, ...}: {
alqueva.fonts = {
names = {
sansSerif = ["Inter"];
monospace = ["Maple Mono"];
sansSerif = ["Fira Sans"];
monospace = ["Fira Mono"];
serif = ["ETBembo"];
emoji = ["OpenMoji Color"];
emoji = ["Twitter Color Emoji"];
};
packages = {
sansSerif = [pkgs.inter];
monospace = [pkgs.maple-mono];
serif = [pkgs.source-serif-pro pkgs.etBook];
emoji = [pkgs.openmoji-color];
sansSerif = [pkgs.fira-sans];
monospace = [pkgs.fira-mono];
serif = [pkgs.etBook];
emoji = [pkgs.twemoji-color-font];
extra = [
pkgs.source-han-sans
pkgs.fira-go
pkgs.noto-fonts
pkgs.nerd-fonts.symbols-only
];
};

View file

@ -11,7 +11,7 @@ riverctl spawn "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG
riverctl map normal "$mod"+Shift Return spawn kitty
riverctl map normal "$mod" P spawn "rofi -show drun"
riverctl map normal "$mod" S spawn "$HOME/.config/river/scripts/screenshot.sh savecopy"
riverctl map normal "$mod" S spawn "flameshot gui"
riverctl map normal "$mod" Q close
riverctl map normal "$mod"+Shift E exit
riverctl map normal "$mod"+Shift C spawn "$HOME/.config/river/init"

View file

@ -1,38 +0,0 @@
#!/usr/bin/env bash
# shellcheck disable=SC1091
source "$HOME/.config/user-dirs.dirs"
case "$1" in
"copy")
GEOM="$(slurp)"
if [ "$GEOM" == "" ]; then
grim - | wl-copy
else
grim -g "$GEOM" - | wl-copy
fi
echo "Screenshot copied."
;;
"save")
GEOM="$(slurp)"
if [ "$GEOM" == "" ]; then
grim "$OUT"
else
grim -g "$GEOM" "$OUT"
fi
echo "Screenshot saved. $OUT"
;;
"savecopy")
GEOM="$(slurp)"
if [ "$GEOM" == "" ]; then
grim - | wl-copy
else
grim -g "$GEOM" - | wl-copy
fi
wl-copy <"$OUT"
echo "Screenshot saved and copied. $OUT"
;;
*)
echo "Not done!"
;;
esac

View file

@ -37,13 +37,14 @@ in {
environment.systemPackages = builtins.attrValues {
inherit
(pkgs)
slurp
grim
wf-recorder
rofi-wayland
kitty
wl-clipboard
;
flameshot = pkgs.flameshot.override {
enableWlrSupport = true;
};
};
services.gnome.gnome-keyring.enable = true;

View file

@ -11,7 +11,10 @@ in {
config = lib.mkIf cfg.enable {
programs = {
ssh.enableAskPassword = true;
ssh = {
enableAskPassword = true;
startAgent = true;
};
seahorse.enable = true;
};
services.openssh.enable = true;

View file

@ -26,31 +26,65 @@ in {
package = pkgs.xonsh.override {
extraPackages = ps: [
(let
name = "xontrib-fish-completer";
pname = "xontrib-fish-completer";
version = "0.0.1";
in
ps.buildPythonPackage {
inherit name version;
inherit pname version;
src = fetchFromGitHub {
owner = "xonsh";
repo = name;
repo = pname;
rev = version;
hash = "sha256-PhhdZ3iLPDEIG9uDeR5ctJ9zz2+YORHBhbsiLrJckyA=";
};
})
(let
name = "xontrib-prompt-starship";
pname = "xontrib-prompt-starship";
version = "0.3.6";
in
ps.buildPythonPackage {
inherit name version;
inherit pname version;
src = fetchFromGitHub {
owner = "anki-code";
repo = name;
repo = pname;
tag = version;
hash = "sha256-CLOvMa3L4XnH53H/k6/1W9URrPakPjbX1T1U43+eSR0=";
};
})
(let
pname = "xontrib-init-ssh-agent";
version = "1.0.1";
in
ps.buildPythonPackage {
inherit pname version;
pyproject = true;
build-system = [
ps.setuptools
ps.wheel
];
dependencies = [
ps.xonsh
];
src = fetchFromGitHub {
owner = "amadaluzia";
repo = pname;
rev = "cac9cfec70ec15b0ed4f1c8a18154ea9b4f8fb47";
hash = "sha256-UkRPdaZFNP8qv7lMwsTUalnre3k2UMfqMzmiTveLiBM=";
};
})
(let
pname = "xonsh-direnv";
version = "1.6.5";
in
ps.buildPythonPackage {
inherit pname version;
src = fetchFromGitHub {
owner = "74th";
repo = pname;
tag = version;
hash = "sha256-huBJ7WknVCk+WgZaXHlL+Y1sqsn6TYqMP29/fsUPSyU=";
};
})
];
};
enable = true;

View file

@ -15,6 +15,7 @@
vimcmd_symbol = "[<](bold green)";
};
cmake = {symbol = "cmake ";};
cmd_duration = {format = "\\[[$duration]($style)\\] ";};
cobol = {symbol = "cobol ";};
conda = {symbol = "conda ";};
crystal = {symbol = "cr ";};
@ -23,7 +24,7 @@
deno = {symbol = "deno ";};
directory = {
read_only = " ro";
format = ">[$path]($style)< ";
format = ":[$path]($style)\\] ";
};
docker_context = {symbol = "docker ";};
dotnet = {symbol = ".NET ";};
@ -32,7 +33,7 @@
fennel = {symbol = "fnl ";};
fossil_branch = {symbol = "fossil ";};
gcloud = {symbol = "gcp ";};
git_branch = {symbol = "git ";};
git_branch = {format = "\\[[$branch(:$remote_branch)]($style)\\] ";};
git_commit = {tag_symbol = " tag ";};
git_status = {
ahead = ">";
@ -40,6 +41,7 @@
deleted = "x";
diverged = "<>";
renamed = "r";
format = "\\[[$all_status$ahead_behind]($style)\\] ";
};
gleam = {symbol = "gleam ";};
golang = {symbol = "go ";};
@ -54,7 +56,7 @@
meson = {symbol = "meson ";};
nats = {symbol = "nats ";};
nim = {symbol = "nim ";};
nix_shell = {symbol = "nix ";};
nix_shell = {format = "\\[[$state( \($name\))]($style)\\] ";};
nodejs = {symbol = "nodejs ";};
ocaml = {symbol = "ml ";};
opa = {symbol = "opa ";};
@ -132,11 +134,11 @@
zig = {symbol = "zig ";};
username = {
show_always = true;
format = "[$user]($style)@";
format = "\\[[$user]($style)@";
};
hostname = {
ssh_only = false;
format = "[$ssh_symbol$hostname]($style) ";
format = "[$ssh_symbol$hostname]($style)";
};
};
in