stuff
Some checks failed
CI / formatting (push) Failing after 9m21s
CI / nix_flake_check (push) Failing after 9m20s

This commit is contained in:
Narrator 2025-12-05 11:02:54 +01:00
parent 2fca95aa89
commit 7e03a1cd64
11 changed files with 428 additions and 424 deletions

View file

@ -2,24 +2,26 @@
description = "python+uv env";
outputs = { self, nixpkgs }: let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in {
devShells.${system}.default = pkgs.mkShell {
packages = [
pkgs.python311
pkgs.uv
pkgs.openssl
pkgs.zlib
pkgs.libffi
pkgs.pkg-config
];
env = {
UV_NO_SYNC = "1";
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig:${pkgs.zlib.dev}/lib/pkgconfig";
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in
{
devShells.${system}.default = pkgs.mkShell {
packages = [
pkgs.python311
pkgs.uv
pkgs.openssl
pkgs.zlib
pkgs.libffi
pkgs.pkg-config
];
env = {
UV_NO_SYNC = "1";
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig:${pkgs.zlib.dev}/lib/pkgconfig";
};
};
};
};
}

142
edit.sh
View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
set - euo pipefail
REPO_ROOT="$(dirname "$(realpath "$0")")"
REPO_ROOT="$(dirname "$(realpath "$0")")"
HOSTS_DIR="$REPO_ROOT/hosts"
EDITOR="vim"
NIXOS_REBUILD_CMD="sudo nixos-rebuild switch --flake"
@ -13,108 +13,108 @@ FZF_DEFAULT_OPTS="
"
get_hosts() {
find "$HOSTS_DIR" -mindepth 1 -maxdepth 1 -type d -exec basename {} \;
find "$HOSTS_DIR" -mindepth 1 -maxdepth 1 -type d -exec basename {} \;
}
choose_host() {
local hosts=($(get_hosts))
if (( ${#hosts[@]} == 0 )); then
echo "no hosts found in $HOSTS_DIR" >&2
exit 1
elif (( ${#hosts[@]} == 1 )); then
echo "${hosts[0]}"
else
printf '%s\n' "${hosts[@]}" | fzf --prompt="select host > " $FZF_DEFAULT_OPTS || exit 1
fi
local hosts=($(get_hosts))
if (( ${#hosts[@]} == 0 )); then
echo "no hosts found in $HOSTS_DIR" >&2
exit 1
elif (( ${#hosts[@]} == 1 )); then
echo "${hosts[0]}"
else
printf '%s\n' "${hosts[@]}" | fzf --prompt="select host > " $FZF_DEFAULT_OPTS || exit 1
fi
}
choose_file() {
local host="$1"
find "$HOSTS_DIR/$host" -type f | fzf --prompt="select file to edit > " $FZF_DEFAULT_OPTS || exit 1
local host="$1"
find "$HOSTS_DIR/$host" -type f | fzf --prompt="select file to edit > " $FZF_DEFAULT_OPTS || exit 1
}
format_with_nixpkgs_fmt() {
local file="$1"
if command -v nixpkgs-fmt &>/dev/null; then
nixpkgs-fmt "$file" || echo "warning: nixpkgs-fmt failed on $file" >&2
else
echo "warning: nixpkgs-fmt not found, skipping formatting" >&2
fi
local file="$1"
if command -v nixpkgs-fmt &>/dev/null; then
nixpkgs-fmt "$file" || echo "warning: nixpkgs-fmt failed on $file" >&2
else
echo "warning: nixpkgs-fmt not found, skipping formatting" >&2
fi
}
commit_changes() {
local msg="$1"
git add "$HOSTS_DIR"
if ! git diff --cached --quiet; then
echo -e "\e[1;33m▶ staged changes diff:\e[0m"
git --no-pager diff --color=always --cached | less -R
echo -e "\n\e[1;36m⏳ committing changes...\e[0m"
if [[ "$msg" == "edit "* ]]; then
msg+=" @$(date '+%Y-%m-%d %H:%M:%S')"
fi
git commit -m "$msg"
echo -e "\e[1;32m✔ commit done\e[0m"
else
echo -e "\e[1;31m⚠ no changes to commit\e[0m"
fi
local msg="$1"
git add "$HOSTS_DIR"
if ! git diff --cached --quiet; then
echo -e "\e[1;33m▶ staged changes diff:\e[0m"
git --no-pager diff --color=always --cached | less -R
echo -e "\n\e[1;36m⏳ committing changes...\e[0m"
if [[ "$msg" == "edit "* ]]; then
msg+=" @$(date '+%Y-%m-%d %H:%M:%S')"
fi
git commit -m "$msg"
echo -e "\e[1;32m✔ commit done\e[0m"
else
echo -e "\e[1;31m⚠ no changes to commit\e[0m"
fi
}
prompt_confirm() {
while true; do
read -rp $'\e[1;34mProceed with nixos-rebuild? [y/N]: \e[0m' yn
case $yn in
[Yy]*) return 0 ;;
[Nn]*|"" ) return 1 ;;
*) echo "please answer y or n." ;;
esac
done
while true; do
read -rp $'\e[1;34mProceed with nixos-rebuild? [y/N]: \e[0m' yn
case $yn in
[Yy]*) return 0 ;;
[Nn]*|"" ) return 1 ;;
*) echo "please answer y or n." ;;
esac
done
}
switch_config() {
local host="$1"
echo -e "\e[1;35mSwitching to host config: $host\e[0m"
if prompt_confirm; then
echo -e "\e[1;33mRunning nixos-rebuild...\e[0m"
$NIXOS_REBUILD_CMD "$REPO_ROOT#$host"
echo -e "\e[1;32mNixos-rebuild completed!\e[0m"
else
echo -e "\e[1;31mNixos-rebuild skipped\e[0m"
fi
local host="$1"
echo -e "\e[1;35mSwitching to host config: $host\e[0m"
if prompt_confirm; then
echo -e "\e[1;33mRunning nixos-rebuild...\e[0m"
$NIXOS_REBUILD_CMD "$REPO_ROOT#$host"
echo -e "\e[1;32mNixos-rebuild completed!\e[0m"
else
echo -e "\e[1;31mNixos-rebuild skipped\e[0m"
fi
}
usage() {
cat <<EOF
cat <<EOF
usage: $0 [-m commit-message]
options:
-m custom commit message (default: "edit <file>")
-m custom commit message (default: "edit <file>")
EOF
exit 1
exit 1
}
main() {
local host file commit_msg default_msg
local host file commit_msg default_msg
commit_msg=""
while getopts ":m:" opt; do
case $opt in
m) commit_msg="$OPTARG" ;;
*) usage ;;
esac
done
shift $((OPTIND -1))
commit_msg=""
while getopts ":m:" opt; do
case $opt in
m) commit_msg="$OPTARG" ;;
*) usage ;;
esac
done
shift $((OPTIND -1))
host=$(choose_host)
file=$(choose_file "$host")
host=$(choose_host)
file=$(choose_file "$host")
format_with_nixpkgs_fmt "$file"
$EDITOR "$file"
format_with_nixpkgs_fmt "$file"
$EDITOR "$file"
default_msg="edit $(basename "$file")"
[[ -z "$commit_msg" ]] && commit_msg="$default_msg"
default_msg="edit $(basename "$file")"
[[ -z "$commit_msg" ]] && commit_msg="$default_msg"
commit_changes "$commit_msg"
switch_config "$host"
commit_changes "$commit_msg"
switch_config "$host"
}
main "$@"

444
flake.lock generated
View file

@ -1,227 +1,227 @@
{
"nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1754091436,
"narHash": "sha256-XKqDMN1/Qj1DKivQvscI4vmHfDfvYR2pfuFOJiCeewM=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "67df8c627c2c39c41dbec76a1f201929929ab0bd",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1755442500,
"narHash": "sha256-RHK4H6SWzkAtW/5WBHsyugaXJX25yr5y7FAZznxcBJs=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "d2ffdedfc39c591367b1ddf22b4ce107f029dcc3",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"ixx": {
"inputs": {
"flake-utils": [
"nixvim",
"nuschtosSearch",
"flake-utils"
],
"nixpkgs": [
"nixvim",
"nuschtosSearch",
"nixpkgs"
]
},
"locked": {
"lastModified": 1748294338,
"narHash": "sha256-FVO01jdmUNArzBS7NmaktLdGA5qA3lUMJ4B7a05Iynw=",
"owner": "NuschtOS",
"repo": "ixx",
"rev": "cc5f390f7caf265461d4aab37e98d2292ebbdb85",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"ref": "v0.0.8",
"repo": "ixx",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1755186698,
"narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fbcf476f790d8a217c3eab4e12033dc4a0f6d23c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
],
"nuschtosSearch": "nuschtosSearch",
"systems": "systems_3"
},
"locked": {
"lastModified": 1754262585,
"narHash": "sha256-Yz5dJ0VzGRzSRHdHldsWQbuFYmtP3NWNreCvPfCi9CI=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "ab1b5962e1ca90b42de47e1172e0d24ca80e6256",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "nixos-25.05",
"repo": "nixvim",
"type": "github"
}
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils_2",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1753771532,
"narHash": "sha256-Pmpke0JtLRzgdlwDC5a+aiLVZ11JPUO5Bcqkj0nHE/k=",
"owner": "NuschtOS",
"repo": "search",
"rev": "2a65adaf2c0c428efb0f4a2bc406aab466e96a06",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"repo": "search",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nixvim": "nixvim"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1754091436,
"narHash": "sha256-XKqDMN1/Qj1DKivQvscI4vmHfDfvYR2pfuFOJiCeewM=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "67df8c627c2c39c41dbec76a1f201929929ab0bd",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1755442500,
"narHash": "sha256-RHK4H6SWzkAtW/5WBHsyugaXJX25yr5y7FAZznxcBJs=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "d2ffdedfc39c591367b1ddf22b4ce107f029dcc3",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"ixx": {
"inputs": {
"flake-utils": [
"nixvim",
"nuschtosSearch",
"flake-utils"
],
"nixpkgs": [
"nixvim",
"nuschtosSearch",
"nixpkgs"
]
},
"locked": {
"lastModified": 1748294338,
"narHash": "sha256-FVO01jdmUNArzBS7NmaktLdGA5qA3lUMJ4B7a05Iynw=",
"owner": "NuschtOS",
"repo": "ixx",
"rev": "cc5f390f7caf265461d4aab37e98d2292ebbdb85",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"ref": "v0.0.8",
"repo": "ixx",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1755186698,
"narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fbcf476f790d8a217c3eab4e12033dc4a0f6d23c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
],
"nuschtosSearch": "nuschtosSearch",
"systems": "systems_3"
},
"locked": {
"lastModified": 1754262585,
"narHash": "sha256-Yz5dJ0VzGRzSRHdHldsWQbuFYmtP3NWNreCvPfCi9CI=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "ab1b5962e1ca90b42de47e1172e0d24ca80e6256",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "nixos-25.05",
"repo": "nixvim",
"type": "github"
}
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils_2",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1753771532,
"narHash": "sha256-Pmpke0JtLRzgdlwDC5a+aiLVZ11JPUO5Bcqkj0nHE/k=",
"owner": "NuschtOS",
"repo": "search",
"rev": "2a65adaf2c0c428efb0f4a2bc406aab466e96a06",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"repo": "search",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nixvim": "nixvim"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}
}

View file

@ -9,13 +9,13 @@
};
flake-utils.url = "github:numtide/flake-utils";
nixvim = {
url = "github:nix-community/nixvim/nixos-25.05";
url = "github:nix-community/nixvim/nixos-25.05";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager, flake-utils, nixvim} @ inputs : {
outputs = { self, nixpkgs, home-manager, flake-utils, nixvim } @ inputs: {
nixosConfigurations.nxs = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
@ -25,16 +25,16 @@
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.users.narrator = import ./hosts/nxs/home.nix;
system.autoUpgrade = {
enable = true;
flake = self.outPath; # <<< here use self.outPath directly, NOT inputs.self
flags = [ "-L" ];
dates = "02:00";
randomizedDelaySec = "45min";
operation = "switch";
};
system.autoUpgrade = {
enable = true;
flake = self.outPath; # <<< here use self.outPath directly, NOT inputs.self
flags = [ "-L" ];
dates = "02:00";
randomizedDelaySec = "45min";
operation = "switch";
};
}
];
};

View file

@ -12,7 +12,7 @@
nix.settings.experimental-features = [ "nix-command" "flakes" ];
fileSystems."/home" = {
device = "/dev/disk/by-uuid/31dbc3a8-dfdc-4177-8d3e-2b6e294e7daf";
device = "/dev/disk/by-uuid/31dbc3a8-dfdc-4177-8d3e-2b6e294e7daf";
fsType = "btrfs";
};
swapDevices = [
@ -24,7 +24,7 @@
#boot.loader.efi.canTouchEfiVariables = true;
boot.loader.grub.enable = true;
boot.loader.grub.efiSupport = true;
boot.loader.efi.efiSysMountPoint= "/boot/efi";
boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.loader.grub.device = "nodev";
boot.loader.grub.useOSProber = true;
boot.loader.grub.configurationLimit = 5;
@ -35,9 +35,9 @@
GRUB_TERMINAL_OUTPUT=console
'';
boot.loader.grub.gfxmodeBios = "1280x720"; # for BIOS, or
boot.loader.grub.gfxmodeEfi = "1280x720"; # for EFI
boot.loader.grub.gfxpayloadBios = "keep";
boot.loader.grub.gfxmodeBios = "1280x720"; # for BIOS, or
boot.loader.grub.gfxmodeEfi = "1280x720"; # for EFI
boot.loader.grub.gfxpayloadBios = "keep";
# Use latest kernel.
boot.kernelPackages = pkgs.linuxPackages_latest;
networking.hostName = "nxs"; # Define your hostname.
@ -221,7 +221,7 @@ boot.loader.grub.gfxpayloadBios = "keep";
open = true;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
# accessible via `nvidia-settings`.
nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU.

View file

@ -5,7 +5,8 @@
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
@ -14,12 +15,14 @@
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/9df74ba0-5121-41be-b0c3-2897142eee59";
{
device = "/dev/disk/by-uuid/9df74ba0-5121-41be-b0c3-2897142eee59";
fsType = "btrfs";
};
fileSystems."/boot/efi" =
{ device = "/dev/disk/by-uuid/A0BF-D7EF";
{
device = "/dev/disk/by-uuid/A0BF-D7EF";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};

View file

@ -14,20 +14,20 @@
home.stateVersion = "25.05";
programs.home-manager.enable = true;
programs.ssh = {
enable = true;
matchBlocks = {
"git.unime.it" = {
hostname = "git.unime.it";
port = 42000; # e.g. 2222
enable = true;
matchBlocks = {
"git.unime.it" = {
hostname = "git.unime.it";
port = 42000; # e.g. 2222
};
};
};
};
home.packages = with pkgs; [
nix-prefetch-github
gemini-cli
nix-prefetch-github
gemini-cli
picard
chromaprint
xorg.xmodmap
@ -67,7 +67,7 @@
nixpkgs-fmt
rofi
pipewire
lshw
lshw
];
programs.direnv = {

View file

@ -1,8 +1,8 @@
{ pkgs, ... }: {
home.packages = [
pkgs.zoxide
home.packages = [
pkgs.zoxide
# fzf for zi magic
pkgs.fzf
pkgs.fzf
];
programs.fish = {
enable = true;
@ -22,60 +22,60 @@
ll = "lsd -l";
la = "lsd -la";
tree = "${pkgs.tree}/bin/tree -C";
# docker/buildx
d = "docker";
di = "docker images";
dps = "docker ps -a";
dl = "docker logs -f";
dr = "docker run -it --rm";
db = "docker buildx build";
dbp = "docker buildx build --push";
dpr = "docker prune -af";
# zoxide
z = "zoxide query"; # fuzzy cd
zi = "zoxide interactive"; # menu cd
za = "zoxide add"; # mark dir
# docker/buildx
d = "docker";
di = "docker images";
dps = "docker ps -a";
dl = "docker logs -f";
dr = "docker run -it --rm";
db = "docker buildx build";
dbp = "docker buildx build --push";
dpr = "docker prune -af";
# zoxide
z = "zoxide query"; # fuzzy cd
zi = "zoxide interactive"; # menu cd
za = "zoxide add"; # mark dir
zrm = "zoxide remove"; # forget dir
# make
m = "make";
mc = "make clean";
mi = "make install";
# k8s poweruser
k = "kubectl";
kx = "kubectx";
kns = "kubens";
kgp = "kubectl get pods -o wide";
kgs = "kubectl get svc";
kgn = "kubectl get nodes -o wide";
kdelp = "kubectl delete pod";
kpf = "kubectl port-forward";
kep = "kubectl exec -it (kubectl get po -o jsonpath='{range .items[*]}{.metadata.name}{\"\t\"}{.status.phase}{\"\n\"}{end}' | fzf | cut -f1) --";
# git porcelain
g = "git";
ga = "git add";
gc = "git commit -v";
gca = "git commit -v -a";
gp = "git push";
gl = "git pull";
gst = "git status -sb";
glog = "git log --oneline --graph --decorate -10";
gb = "git branch";
gco = "git checkout";
grb = "git rebase -i";
gsta = "git stash push -m";
gdiff = "git diff --cached";
# make
m = "make";
mc = "make clean";
mi = "make install";
# k8s poweruser
k = "kubectl";
kx = "kubectx";
kns = "kubens";
kgp = "kubectl get pods -o wide";
kgs = "kubectl get svc";
kgn = "kubectl get nodes -o wide";
kdelp = "kubectl delete pod";
kpf = "kubectl port-forward";
kep = "kubectl exec -it (kubectl get po -o jsonpath='{range .items[*]}{.metadata.name}{\"\t\"}{.status.phase}{\"\n\"}{end}' | fzf | cut -f1) --";
# git porcelain
g = "git";
ga = "git add";
gc = "git commit -v";
gca = "git commit -v -a";
gp = "git push";
gl = "git pull";
gst = "git status -sb";
glog = "git log --oneline --graph --decorate -10";
gb = "git branch";
gco = "git checkout";
grb = "git rebase -i";
gsta = "git stash push -m";
gdiff = "git diff --cached";
};
plugins = [
{
name = "fish-logo";
name = "fish-logo";
src = pkgs.fetchFromGitHub {
owner= "laughedelic";
repo= "fish_logo";
rev= "dc6a40836de8c24c62ad7c4365aa9f21292c3e6e";
sha256= "sha256-DZXQt0fa5LdbJ4vPZFyJf5FWB46Dbk58adpHqbiUmyY=";
owner = "laughedelic";
repo = "fish_logo";
rev = "dc6a40836de8c24c62ad7c4365aa9f21292c3e6e";
sha256 = "sha256-DZXQt0fa5LdbJ4vPZFyJf5FWB46Dbk58adpHqbiUmyY=";
};
}
{
@ -83,33 +83,33 @@
src = pkgs.fishPlugins.grc.src;
}
{
name = "fzf.fish";
src = pkgs.fetchFromGitHub {
owner = "PatrickF1";
repo = "fzf.fish";
rev = "8920367cf85eee5218cc25a11e209d46e2591e7a";
sha256 = "sha256-T8KYLA/r/gOKvAivKRoeqIwE2pINlxFQtZJHpOy9GMM=";
};
}
{
name = "gitnow";
src = pkgs.fetchFromGitHub {
owner = "joseluisq";
repo = "gitnow";
rev = "818996a5a1de5af697d909a44fb27ac1c8856aad";
hash = "sha256-3pLOeeY1Wo9GJVhA2YxSTlVR0wWG9hHpr3BcHHfPrnA=";
};
}
{
name = "pure";
src = pkgs.fetchFromGitHub {
owner = "pure-fish";
repo = "pure";
rev = "f435b584884ebb7c9c75de8967202e3d3299b73a";
hash = "sha256-LtiaIlMJ1ZyzNvBzi5uPztoBV6G57Q6z6HUFcOBi9cg=";
};
}
{
name = "fzf.fish";
src = pkgs.fetchFromGitHub {
owner = "PatrickF1";
repo = "fzf.fish";
rev = "8920367cf85eee5218cc25a11e209d46e2591e7a";
sha256 = "sha256-T8KYLA/r/gOKvAivKRoeqIwE2pINlxFQtZJHpOy9GMM=";
};
}
{
name = "gitnow";
src = pkgs.fetchFromGitHub {
owner = "joseluisq";
repo = "gitnow";
rev = "818996a5a1de5af697d909a44fb27ac1c8856aad";
hash = "sha256-3pLOeeY1Wo9GJVhA2YxSTlVR0wWG9hHpr3BcHHfPrnA=";
};
}
{
name = "pure";
src = pkgs.fetchFromGitHub {
owner = "pure-fish";
repo = "pure";
rev = "f435b584884ebb7c9c75de8967202e3d3299b73a";
hash = "sha256-LtiaIlMJ1ZyzNvBzi5uPztoBV6G57Q6z6HUFcOBi9cg=";
};
}
];
functions.fish_greeting.body = ''
fish_logo

View file

@ -112,4 +112,4 @@
jupytext-nvim
];
};
}
}

View file

@ -4,4 +4,4 @@
programs.nixvim = {
colorschemes.tokyonight.settings.style = "storm";
};
}
}

View file

@ -1,4 +1,3 @@
{ config, pkgs, ... }:
{
@ -11,8 +10,8 @@
enableFishIntegration = false; # or true if you use it
settings = {
keybinds.normal = {
keybinds.normal = {
bind = [
{
key = "Ctrl+a";