push changes

This commit is contained in:
zack 2024-11-13 20:35:13 -05:00
parent 6ea10852a9
commit 9aa6f3fdbe
No known key found for this signature in database
GPG key ID: 5F873416BCF59F35
20 changed files with 573 additions and 277 deletions

View file

@ -30,5 +30,5 @@
"news": {
"NEWS.md": "6520"
},
"version": 6
"version": 7
}

View file

@ -1,37 +1,34 @@
function confirm(opts)
local cmp = require("blink.cmp")
opts = vim.tbl_extend("force", { select = true }, opts or {})
return function(fallback) end
end
return {
{
"LazyVim/LazyVim",
opts = {
colorscheme = "catppuccin",
news = { lazyvim = false },
},
},
"f-person/git-blame.nvim",
{ "nvim-lualine/lualine.nvim", enabled = false },
-- {
-- "nvim-neorg/neorg",
-- lazy = false, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default
-- version = "*", -- Pin Neorg to the latest stable release
-- config = true,
-- opts = {
-- load = {
-- ["core.defaults"] = {},
-- ["core.concealer"] = {},
-- },
-- },
-- },
{ "echasnovski/mini.statusline", opts = {} },
{
"L3MON4D3/LuaSnip",
dependencies = {
"rafamadriz/friendly-snippets",
},
config = function()
require("luasnip.loaders.from_vscode").lazy_load()
require("luasnip.loaders.from_vscode").lazy_load({
paths = vim.fn.stdpath("config") .. "/snippets/",
})
end,
},
"direnv/direnv.vim",
{
"stevearc/conform.nvim",
opts = {
formatters_by_ft = {
nix = { "alejandra" },
typescript = { "prettierd" },
typescriptreact = { "prettierd" },
javascriptreact = { "prettierd" },
javascript = { "prettierd" },
},
},
@ -49,6 +46,13 @@ return {
-- whitespace = { highlight = "Whitespace", "NonText" },
-- },
},
-- lua with lazy.nvim
{
"max397574/better-escape.nvim",
config = function()
require("better_escape").setup()
end,
},
{
"jake-stewart/force-cul.nvim",
config = function()

View file

@ -5,85 +5,77 @@
pkgs,
...
}:
with lib;
with lib.custom; let
with lib; let
cfg = config.apps.tools.starship;
in {
options.apps.tools.starship = with types; {
enable = mkBoolOpt false "Enable Tmux";
enable = mkEnableOption "Starship prompt";
};
config = mkIf cfg.enable {
home.packages = [
pkgs.custom.getgithost
];
programs.starship = {
enable = true;
enableZshIntegration = config.programs.zsh.enable;
settings = {
add_newline = false;
command_timeout = 1000;
scan_timeout = 10;
format = ''
$username$shlvl$kubernetes''${custom.dir}''${custom.home_dir}$directory''${custom.git_host}$git_branch$git_commit$git_state$git_status$hg_branch$docker_context$package$cmake$dart$dotnet$elixir$elm$erlang$golang$helm$java$julia$kotlin$nim$nodejs$ocaml$perl$php$purescript$python$ruby$rust$swift$terraform$vagrant$zig$nix_shell$conda$aws$gcloud$openstack$env_var$crystal$custom$cmd_duration$lua$line_break$jobs$status$character
'';
character = {
success_symbol = "[>](#89b4fa)[>](#f5c2e7)[>](#f2cdcd)";
error_symbol = "[>>>](red)";
format = "$username$directory$git_branch$git_status$python$rust$nodejs$nix_shell$cmd_duration$line_break$character";
# Username display
username = {
style_user = "blue bold";
style_root = "red bold";
format = "[$user]($style) ";
show_always = true;
};
# Modern minimal prompt character
character = {
success_symbol = "[>](blue)";
error_symbol = "[>](red)";
};
# Simplified directory display
directory = {
truncation_length = 1;
format = "[ $path ]($style)[$read_only]($read_only_style) ";
style = "fg:white bg:black bold";
read_only = " ";
read_only_style = "fg:black bg:red";
style = "bold lavender";
format = "[$path]($style) ";
read_only = " ";
};
git_commit = {commit_hash_length = 7;};
git_branch = {format = "[$symbol$branch]($style) ";};
# Streamlined git status indicators
git_branch = {
format = "[$symbol$branch]($style) ";
style = "mauve";
};
git_status = {
conflicted = "[<](white)=[$count](bright-white bold)[>](white)";
ahead = "[<](white)[$count](bright-white bold)[>](white)";
behind = "[<](white)[$count](bright-white bold)[>](white)";
diverged = "[<](white)[$ahead_count](bright-white bold)[$behind_count](bright-white)[>](white)";
untracked = "[<](white)?[$count](bright-white bold)[>](white)";
stashed = "[<](white)$[$count](bright-white bold)[>](white)";
modified = "[<](white)![$count](bright-white bold)[>](white)";
staged = "[<](white)+[$count](bright-white bold)[>](white)";
renamed = "[<](white)»[$count](bright-white bold)[>](white)";
deleted = "[<](white)[$count](bright-white bold)[>](white)";
format = "[$all_status$ahead_behind]($style) ";
style = "bold peach";
conflicted = "=";
ahead = "";
behind = "";
diverged = "";
untracked = "?";
stashed = "$";
modified = "!";
staged = "+";
renamed = "»";
deleted = "";
};
custom = {
home_dir = {
command = "echo ";
when = "[ \"$PWD\" == \"$HOME\" ]";
shell = "[\"bash\",\"--norc\",\"--noprofile\"]";
style = "fg:bright-white bg:bright-black";
format = "[ $output ]($style)";
};
dir = {
command = "echo ";
when = "[ \"$PWD\" != \"$HOME\" ]";
shell = "[\"bash\",\"--norc\",\"--noprofile\"]";
style = "fg:blue bg:bright-black";
format = "[ $output ]($style)";
};
git_host = {
command = "getgithost";
when = "git rev-parse --is-inside-work-tree 2> /dev/null";
shell = "[\"bash\",\"--norc\",\"--noprofile\"]";
style = "bright-yellow bold";
format = "at [$output]($style)";
};
# Language modules with minimal styling
python.symbol = "[](yellow) ";
rust.symbol = "[](peach) ";
nodejs.symbol = "[](green) ";
nix_shell.symbol = "[](blue) ";
# Command duration and line break
cmd_duration = {
format = "[$duration]($style) ";
style = "yellow";
};
line_break.disabled = false;
lua.symbol = "[](blue) ";
python.symbol = "[](blue) ";
hostname = {
ssh_only = true;
format = "[$hostname](bold blue) ";
disabled = false;
};
};
};
};

View file

@ -35,24 +35,17 @@ in {
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_right_separator " "
set -g @catppuccin_window_middle_separator " "
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_default_text "#W"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#W#{?window_zoomed_flag,(),}"
set -g @catppuccin_status_modules_right "directory meetings cpu date_time uptime"
set -g @catppuccin_status_modules_left "session"
set -g @catppuccin_status_left_separator " "
set -g @catppuccin_status_right_separator " "
set -g @catppuccin_status_right_separator_inverse "no"
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "no"
set -g @catppuccin_directory_text "#{b:pane_current_path}"
set -g @catppuccin_meetings_text "#($HOME/.config/tmux/scripts/cal.sh)"
set -g @catppuccin_date_time_text "%H:%M"
set -g @catppuccin_flavor "mocha"
set -g @catppuccin_window_status_style "basic"
set -g default-terminal "tmux-256color"
set -g status-right-length 100
set -g status-left-length 100
set -g status-left ""
set -g status-right "#{E:@catppuccin_status_application}"
set -agF status-right "#{E:@catppuccin_status_cpu}"
set -ag status-right "#{E:@catppuccin_status_session}"
set -ag status-right "#{E:@catppuccin_status_uptime}"
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle

View file

@ -37,7 +37,7 @@ in {
Service = {
Restart = "always";
ExecStart = "${pkgs.protonmail-bridge}/bin/protonmail-bridge --no-window --log-level ${cfg.logLevel}" + optionalString (cfg.nonInteractive) " --noninteractive";
ExecStart = "${lib.getExe pkgs.hydroxide} serve";
};
Install = {

View file

@ -18,6 +18,7 @@ with pkgs; {
MANPAGER = "sh -c 'col -bx | bat -l man -p'";
du = getExe du-dust;
ps = getExe procs;
lb = "pw-loopback -C \"alsa_input.pci-0000_0d_00.4.analog-stereo\" -P \"Scarlett Solo (3rd Gen.) Headphones / Line 1-2\"";
deploy = "nixos-rebuild switch --flake ~/nixos#pluto --target-host zoeys.computer --use-remote-sudo";
m = "mkdir -p";
fcd = "cd $(find -type d | fzf)";

View file

@ -56,7 +56,7 @@ in {
wayland.windowManager.hyprland.settings = with colors; {
exec-once = [
# "pw-loopback -C \"alsa_input.pci-0000_0d_00.4.analog-stereo\" -P \"Scarlett Solo (3rd Gen.) Headphones / Line 1-2\""
"pw-loopback -C \"alsa_input.pci-0000_0d_00.4.analog-stereo\" -P \"Scarlett Solo (3rd Gen.) Headphones / Line 1-2\""
# "systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"

View file

@ -26,8 +26,8 @@ in {
extraConfig.pipewire.adjust-sample-rate = {
"context.properties" = {
"default.clock.rate" = 96000;
"default.allowed-rates" = [96000];
"default.clock.rate" = 48000;
"default.allowed-rates" = [48000];
};
};

View file

@ -40,6 +40,7 @@ in {
"git+ssh://github.com/"
"git+https://git.zoeys.computer/"
"git+ssh://git.zoeys.computer/"
"path:"
];
trustedUsers = ["hydra"]; # Ensure hydra user is trusted for nix
buildMachines = [

View file

@ -0,0 +1 @@
did:plc:xcdmmzavba7hda7cdllvnm3q

View file

@ -0,0 +1,11 @@
age-encryption.org/v1
-> ssh-ed25519 lGzg3g ubKqOxjQuETum4jFizgaF7Howiz/Q8jyaOHoXgovd18
DDVTAdDUGQUmJte2+VdmRfzlMdoT9534SKJDCAo8z1w
-> ssh-ed25519 s+NXzQ G46FDbxKPW3tpE46NiUZY6TZcWzgZ4lS4eYmjz4oJhc
iv11dp9dWYnWACkWG9xorOzpEl1689qnQImdJby/ip4
-> ssh-ed25519 yEtzbQ 9s9q70RO4zrKGf6ih80jyD+roAUJIHjyQQKRqNo0SGg
xTE6HvJt2n99B6ltwlmFSdw5nnSIcVb444BTHXOjVUI
-> ssh-ed25519 RMNffg Meu8usfE+zFiZnOAEjCvEEQ13VBxCmlo79OLDQ0Ppyo
zqh3VzlfeFBNA/SgdD+wFgfKaWYNmN1UcwrRn8JEj70
--- 0OGQgnI656lh0EnAxN5Pygo6DbcN/fVETwR055tEP+E
Ok8<6B>3?¹ Û™­]#¬Ð…z=«Y<C2AB> Û6P NñšÄDÚ#P:Å•”Å7Á<^8Í<õCªí‰ÅŸ1/ 8f7¶_ùã p5« .÷L|<7C>g6 y+¡ÚúM;P'n%wŒŒ)~år8XÖNaÆÿ¦´PZU£&Qì³,Èe

View file

@ -0,0 +1,224 @@
{
config,
lib,
...
}:
with lib; let
cfg = config.services.atproto-pds;
in {
options.services.atproto-pds = {
enable = mkEnableOption "Bluesky Personal Data Server container";
dataDir = mkOption {
type = types.path;
default = "/pds";
description = "Directory to store PDS data, maps to /pds inside container.";
};
blobStorage = {
type = mkOption {
type = types.enum ["disk" "s3"];
default = "disk";
description = "Type of blob storage to use (disk or s3).";
};
# Disk-specific options
diskPath = mkOption {
type = types.str;
default = "/pds/blocks";
description = "Path for disk-based blob storage.";
};
# S3-specific options
s3 = {
endpoint = mkOption {
type = types.nullOr types.str;
default = null;
description = "S3 endpoint URL (optional, for non-AWS S3).";
};
bucket = mkOption {
type = types.str;
default = "";
description = "S3 bucket name.";
};
region = mkOption {
type = types.str;
default = "us-east-1";
description = "AWS region for S3.";
};
};
};
environmentFile = mkOption {
type = types.path;
default = "/pds/pds.env";
description = "Environment file for PDS configuration.";
};
image = mkOption {
type = types.str;
default = "ghcr.io/bluesky-social/pds";
description = "PDS container image to use.";
};
imageTag = mkOption {
type = types.str;
default = "0.4";
description = "Tag of the PDS container image.";
};
port = mkOption {
type = types.port;
default = 3000;
description = "Port on which PDS will listen.";
};
useHostNetwork = mkOption {
type = types.bool;
default = false;
description = "Whether to use host networking. Set to false to use port mapping instead.";
};
nginx = {
enable = mkOption {
type = types.bool;
default = true;
description = "Whether to enable nginx virtual host.";
};
domain = mkOption {
type = types.str;
default = "zoeys.computer";
description = "Domain name for the PDS server.";
};
subdomainPrefix = mkOption {
type = types.str;
default = "*";
description = "Subdomain prefix for PDS (e.g., pds.zoeys.computer).";
};
useACME = mkOption {
type = types.bool;
default = true;
description = "Whether to enable automatic HTTPS certificates via ACME.";
};
extraConfig = mkOption {
type = types.lines;
default = "";
description = "Additional nginx configuration.";
};
};
};
config = mkIf cfg.enable {
age.secrets = {
pds = {
file = ./pds.age;
};
cloudflare = {
file = ./cloudflare.age;
};
};
# Ensure directories exist
systemd.tmpfiles.rules =
[
"d '${cfg.dataDir}' 0750 root root - -"
# Create blocks directory if using disk storage
]
++ optional (cfg.blobStorage.type == "disk")
"d '${cfg.blobStorage.diskPath}' 0750 root root - -";
# Docker container configuration
virtualisation.oci-containers = {
backend = "docker";
containers.pds = {
image = "${cfg.image}:${cfg.imageTag}";
autoStart = true;
extraOptions =
[
"--name=pds"
"--env-file=${config.age.secrets.pds.path}"
]
++ (optional cfg.useHostNetwork "--network=host");
# Add port mapping if not using host network
ports = mkIf (!cfg.useHostNetwork) [
"${toString cfg.port}:3000"
];
# Match docker-compose volumes
volumes = [
"${cfg.dataDir}:/pds"
];
};
};
# Nginx configuration remains the same as before
services.nginx = mkIf cfg.nginx.enable {
enable = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
recommendedOptimisation = true;
recommendedGzipSettings = true;
virtualHosts = {
"${cfg.nginx.domain}" = {
enableACME = cfg.nginx.useACME;
forceSSL = cfg.nginx.useACME;
locations = {
"~ ^/xrpc/(.*)$" = {
proxyPass = "http://127.0.0.1:${toString cfg.port}";
proxyWebsockets = true;
extraConfig = ''
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
'';
};
"~ ^/.well-known/atproto-did$" = {
root = ./atproto;
extraConfig = ''
default_type text/plain;
'';
};
};
};
"~^(?<subdomain>.+)\\.${cfg.nginx.domain}" = {
useACMEHost = "pds.zoeys.computer";
forceSSL = cfg.nginx.useACME;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString cfg.port}";
proxyWebsockets = true;
extraConfig = ''
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
${cfg.nginx.extraConfig}
'';
};
};
};
};
security.acme.certs = mkIf cfg.nginx.useACME {
"pds.zoeys.computer" = {
domain = "*.zoeys.computer";
dnsProvider = "cloudflare";
credentialsFile = config.age.secrets.cloudflare.path;
group = config.services.nginx.group;
};
};
};
}

Binary file not shown.

View file

@ -29,20 +29,21 @@ in {
lexend
jost
dejavu_fonts
(pkgs-unstable.iosevka.override {
set = "Custom";
privateBuildPlan = ''
[buildPlans.IosevkaCustom]
family = "Iosevka"
spacing = "normal"
serifs = "sans"
noCvSs = true
exportGlyphNames = true
[buildPlans.IosevkaCustom.variants]
inherits = "ss14"
'';
})
iosevka
# (pkgs-unstable.iosevka.override {
# set = "Custom";
# privateBuildPlan = ''
# [buildPlans.IosevkaCustom]
# family = "Iosevka"
# spacing = "normal"
# serifs = "sans"
# noCvSs = true
# exportGlyphNames = true
#
# [buildPlans.IosevkaCustom.variants]
# inherits = "ss14"
# '';
# })
noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji