Compare commits

..

7 Commits

6 changed files with 80 additions and 76 deletions

1
.envrc
View File

@ -1,2 +1,3 @@
use flake
export NH_FLAKE=$(expand_path .)
export NH_ELEVATION_STRATEGY=passwordless

View File

@ -53,7 +53,7 @@
];
};
"qui" = {
image = "ghcr.io/autobrr/qui:v1.19.0@sha256:baa07db5326f75f8c2246703603cbe2132476c8ad0ab31c976a960cb4c4731f5";
image = "ghcr.io/autobrr/qui:v1.22.0@sha256:5d4f98d973129edc3ac04a2b74e3e791c86c5c92ef4d5dae64622be000578e80";
autoStart = true;
dependsOn = [ "qbittorrent" ];
volumes = [

View File

@ -8,7 +8,6 @@
];
nix.settings = {
extra-nix-path = "nixpkgs=flake:nixpkgs";
substituters = [
"https://cache.nixos.org"
"https://cache.lix.systems"
@ -19,6 +18,7 @@
];
trusted-users = [ "@admin" ];
};
nix.nixPath = [ "nixpkgs=flake:nixpkgs" ];
users.users.agatha.packages = with pkgs; [
age-plugin-se
@ -32,6 +32,11 @@
home = lib.mkForce "/Users/agatha";
};
security.pam.services.sudo_local = {
touchIdAuth = true;
reattach = true;
};
fonts.packages = with pkgs; [
nerd-fonts.daddy-time-mono
nerd-fonts.symbols-only

View File

@ -9,6 +9,7 @@ let
in
{
imports = [
../../common/home_manager/fish.nix
../../common/home_manager/helix.nix
../../common/home_manager/vcs.nix
];
@ -25,12 +26,13 @@ in
choose
eza
fd
fzf
ouch
ripgrep
(lib.mkIf (cfg.programs.starship.enable && cfg.programs.jujutsu.enable) (unstable.jj-starship))
];
home.shell.enableShellIntegration = true;
programs = {
home-manager.enable = true;
@ -80,75 +82,6 @@ in
};
};
fish = {
enable = true;
plugins = [
{
name = "fzf";
src = pkgs.fetchFromGitHub {
owner = "jethrokuan";
repo = "fzf";
rev = "479fa67d7439b23095e01b64987ae79a91a4e283";
sha256 = "0k6l21j192hrhy95092dm8029p52aakvzis7jiw48wnbckyidi6v";
};
}
];
shellAliases = {
ls = "eza -lhT --classify=always --group-directories-first --level 1";
cat = "bat";
ip = "ip -color=always";
youtube-dl-audio = ''yt-dlp --ignore-errors --output "%(title)s.%(ext)s" --extract-audio --audio-format best'';
# rsync = "rsync -az --partial --info=progress2";
};
shellAliases.tailscale = lib.mkIf (
!pkgs.stdenv.isLinux
) "/Applications/Tailscale.app/Contents/MacOS/Tailscale";
functions = {
expand-dot-to-parent-directory-path = ''
# expand ... to ../.. etc
# https://github.com/fish-shell/fish-shell/issues/1891#issuecomment-451961517
# Get commandline up to cursor
set -l cmd (commandline --cut-at-cursor)
# Match last line
switch $cmd[-1]
case '*..'
commandline --insert '/.'
case '*'
commandline --insert '.'
end
'';
impostor = ''
echo $argv[1] | string sub -s 13 | fold -w1 | shuf | tr -d '\n' | sed 's/^/cccccbeujtje/'
'';
};
shellInit = ''
set -x SSH_AUTH_SOCK /Users/agatha/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh
set -Ux AWT_TOOLKIT MToolkit
set -Ux JDK_JAVA_OPTIONS "-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Djdk.gtk.version=3 -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true"
# Zoxide
set -Ux _ZO_FZF_OPTS "--no-sort --height=30% --exit-0 --select-1 --bind=ctrl-z:ignore"
# Fix locale errors in Nix
set -Ux LOCALE_ARCHIVE /usr/lib/locale/locale-archive
# PATH
set -gx fish_user_paths $fish_user_paths \
/home/agatha/.local/bin \
/home/agatha/.cargo/bin \
/home/agatha/.cabal/bin
if type -q ruby
fish_add_path -a (ruby -e 'print Gem.user_dir')/bin
end
bind . 'expand-dot-to-parent-directory-path'
'';
};
tealdeer = {
enable = true;
settings = {
@ -158,15 +91,19 @@ in
zoxide = {
enable = true;
enableFishIntegration = true;
options = [ "--cmd v" ];
};
command-not-found.enable = false;
nix-index = {
fzf = {
enable = true;
enableFishIntegration = true;
historyWidgetOptions = [
"--height 40%"
"--with-nth 3.."
];
};
command-not-found.enable = false;
nix-index.enable = true;
};
home.file.".sqliterc".text = ''

View File

@ -0,0 +1,60 @@
{ pkgs, lib, ... }: {
home-manager.users.agatha = {
programs.fish = {
enable = true;
shellAliases = {
ls = "eza -lhT --classify=always --group-directories-first --level 1";
cat = "bat";
};
shellAliases.tailscale = lib.mkIf pkgs.stdenv.isDarwin "/Applications/Tailscale.app/Contents/MacOS/Tailscale";
functions = {
expand-dot-to-parent-directory-path = ''
# expand ... to ../.. etc
# https://github.com/fish-shell/fish-shell/issues/1891#issuecomment-451961517
# Get commandline up to cursor
set -l cmd (commandline --cut-at-cursor)
# Match last line
switch $cmd[-1]
case '*..'
commandline --insert '/.'
case '*'
commandline --insert '.'
end
'';
impostor = ''
echo $argv[1] | string sub -s 13 | fold -w1 | shuf | tr -d '\n' | sed 's/^/cccccbeujtje/'
'';
};
shellInit = ''
if test (uname) = "Darwin"
set -gx SSH_AUTH_SOCK /Users/agatha/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh
end
if test (uname) = "Linux"
set -gx AWT_TOOLKIT MToolkit
set -gx JDK_JAVA_OPTIONS "-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Djdk.gtk.version=3 -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true"
# Fix locale errors in Nix
set -gx LOCALE_ARCHIVE /usr/lib/locale/locale-archive
end
# Zoxide
set -gx _ZO_FZF_OPTS "--no-sort --height=30% --exit-0 --select-1 --bind=ctrl-z:ignore"
# PATH
set -gx fish_user_paths $fish_user_paths \
$HOME/.local/bin \
$HOME/.cargo/bin \
$HOME/.cabal/bin
if type -q ruby
fish_add_path -a (ruby -e 'print Gem.user_dir')/bin
end
bind . 'expand-dot-to-parent-directory-path'
'';
};
};
}

View File

@ -156,6 +156,7 @@
"ui.text" = lighter_gray;
"ui.text.focus" = light_purple;
"ui.virtual.whitespace" = lighter_black;
"ui.virtual.jump-label" = light_red;
"string.special.url" = {
fg = lighter_gray;
underline = {