From 14ff6a7a257a93e1e01acb4304ee0bb230dcf563 Mon Sep 17 00:00:00 2001 From: Matt Nish-Lapidus Date: Sat, 22 Mar 2025 10:57:26 -0400 Subject: [PATCH] refactoring and minor updates --- flake.lock | 24 +++++++++---------- hosts/eddie/configuration.nix | 2 +- modules/home/niri.nix | 19 ++++++++++++--- modules/home/shell-conf.nix | 9 +++---- .../shell-conf/fish/functions/git-fake.fish | 6 +++++ .../home/shell-conf/fish/functions/lla.fish | 4 ++-- .../home/shell-conf/fish/functions/ls.fish | 6 +---- 7 files changed, 43 insertions(+), 27 deletions(-) create mode 100644 modules/home/shell-conf/fish/functions/git-fake.fish diff --git a/flake.lock b/flake.lock index a9881a7..3f33d7e 100644 --- a/flake.lock +++ b/flake.lock @@ -70,11 +70,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1742609412, - "narHash": "sha256-IxX39CKe2jknL7ipiufh92z0V3WXfdpe+oHIzAqtcTs=", + "lastModified": 1742634825, + "narHash": "sha256-2WGJ1GpYDb12+7dZYUXTXflGgkIssWLK0kbbQa1Fsps=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "724499d6305658949e21e01f5624ac429d9ab48a", + "rev": "31ee8006935d8c3ce678854d8e46d74915a16960", "type": "github" }, "original": { @@ -744,11 +744,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1742567165, - "narHash": "sha256-yhGDoiF5hOvphi3R0Wm7RVbFQMi2eFlfmOcCRchqmlw=", + "lastModified": 1742643921, + "narHash": "sha256-tt6FIFIfOHcgKxi6fBD4RxIk3JoYF2WNpVE9jLWT7eI=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "314180820701b755731d7900ff561414a55c17ae", + "rev": "ecd613c125c16295b52bb52f3687c5538b7d95ff", "type": "github" }, "original": { @@ -777,11 +777,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1742542657, - "narHash": "sha256-lUz/YftLDTZvsgbzC2bppHLbflsS/NuaNZXp3UvvYgw=", + "lastModified": 1742641057, + "narHash": "sha256-+OhtlQPNOKmwK6YtAaXPu42jXe3ufi7hny78N8dqDKA=", "owner": "YaLTeR", "repo": "niri", - "rev": "fd1f43673cf4d1e84d9da67e294c040934034eda", + "rev": "ed20822ce947198e4106698d7afffd0a832a7b3c", "type": "github" }, "original": { @@ -907,11 +907,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1742376361, - "narHash": "sha256-VFMgJkp/COvkt5dnkZB4D2szVdmF6DGm5ZdVvTUy61c=", + "lastModified": 1742631601, + "narHash": "sha256-yJ3OOAmsGAxSl0bTmKUp3+cEYtSS+V6hUPK2rYhIPr8=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "daaae13dff0ecc692509a1332ff9003d9952d7a9", + "rev": "380ed15bcd6440606c6856db44a99140d422b46f", "type": "github" }, "original": { diff --git a/hosts/eddie/configuration.nix b/hosts/eddie/configuration.nix index d736f3e..8f1641c 100644 --- a/hosts/eddie/configuration.nix +++ b/hosts/eddie/configuration.nix @@ -160,7 +160,7 @@ win-virtio win-spice - xwayland-satellite-unstable + xwayland-satellite ]; # Bootloader. diff --git a/modules/home/niri.nix b/modules/home/niri.nix index 231d94e..6f58c2f 100644 --- a/modules/home/niri.nix +++ b/modules/home/niri.nix @@ -108,7 +108,7 @@ in animations.slowdown = 1.0; layout = { - gaps = 10; + gaps = 6; center-focused-column = "never"; always-center-single-column = true; @@ -149,8 +149,9 @@ in width = pkgs.rice.border-width + 1; }; - shadow = { - enable = true; + struts = { + right = 6; + left = 6; }; }; @@ -224,6 +225,18 @@ in ]; open-maximized = true; } + + { + matches = [ + { is-floating = true; } + ]; + + shadow = { + enable = true; + softness = 10; + spread = 8; + }; + } ]; # switch-events = with config.lib.niri.actions; { diff --git a/modules/home/shell-conf.nix b/modules/home/shell-conf.nix index bb8ffee..99c08ec 100644 --- a/modules/home/shell-conf.nix +++ b/modules/home/shell-conf.nix @@ -1,4 +1,4 @@ -{ nix-config, inputs, pkgs, ... }: +{ nix-config, lib, inputs, pkgs, ... }: { home.packages = with pkgs; [ @@ -94,7 +94,6 @@ fish = { enable = true; shellAliases = { - "ls" = "eza"; "em" = "emacsclient -n -r"; "mkdir" = "mkdir -pv"; }; @@ -132,15 +131,17 @@ wezterm = { enable = true; package = inputs.wezterm.packages.${pkgs.system}.default; - # extraConfig = lib.readFile ./dotfiles/dot_config/wezterm/wezterm.lua; }; bat = { enable = true; }; eza = { enable = true; - git = true; enableFishIntegration = true; + git = true; + icons = "auto"; + colors = "auto"; + # extraOptions = [ "--header" ]; }; fd = { enable = true; diff --git a/modules/home/shell-conf/fish/functions/git-fake.fish b/modules/home/shell-conf/fish/functions/git-fake.fish new file mode 100644 index 0000000..2808026 --- /dev/null +++ b/modules/home/shell-conf/fish/functions/git-fake.fish @@ -0,0 +1,6 @@ +#!/usr/bin/env fish + +function git-fake --description 'add file to repo without actually adding it (for nix flake needs)' + git add --intent-to-add $argv + git update-index --skip-worktree --assume-unchanged $argv +end diff --git a/modules/home/shell-conf/fish/functions/lla.fish b/modules/home/shell-conf/fish/functions/lla.fish index cadf708..950fdf6 100644 --- a/modules/home/shell-conf/fish/functions/lla.fish +++ b/modules/home/shell-conf/fish/functions/lla.fish @@ -1,3 +1,3 @@ -function lla --wraps='eza -la' --description 'alias lla eza -la' - eza -la $argv +function lla --wraps='ls' --description 'alias lla eza -la' + ls -la $argv end diff --git a/modules/home/shell-conf/fish/functions/ls.fish b/modules/home/shell-conf/fish/functions/ls.fish index 4f06a18..4144383 100644 --- a/modules/home/shell-conf/fish/functions/ls.fish +++ b/modules/home/shell-conf/fish/functions/ls.fish @@ -1,7 +1,3 @@ function ls --wraps=eza --description 'eza instead of ls' - if type --quiet eza - eza --git --header --icons $argv - else - command ls --color=auto $argv - end + eza --git --header --icons $argv end