diff --git a/flake.lock b/flake.lock index cbd096e..3abae8d 100644 --- a/flake.lock +++ b/flake.lock @@ -21,6 +21,22 @@ "type": "github" } }, + "fonts": { + "flake": false, + "locked": { + "lastModified": 1759511756, + "narHash": "sha256-auYJCZ7lOOIx7Zu4jeyXNczBxVVCWlFHVD7nnVQ0PCQ=", + "ref": "refs/heads/main", + "rev": "ebf1959cd6ec64320f372383ea8d19157cbf7e01", + "revCount": 3, + "type": "git", + "url": "ssh://git@github.com/barrettruth/fonts.git" + }, + "original": { + "type": "git", + "url": "ssh://git@github.com/barrettruth/fonts.git" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -28,11 +44,11 @@ ] }, "locked": { - "lastModified": 1769397130, - "narHash": "sha256-TTM4KV9IHwa181X7afBRbhLJIrgynpDjAXJFMUOWfyU=", + "lastModified": 1770491427, + "narHash": "sha256-8b+0vixdqGnIIcgsPhjdX7EGPdzcVQqYxF+ujjex654=", "owner": "nix-community", "repo": "home-manager", - "rev": "c37679d37bdbecf11bbe3c5eb238d89ca4f60641", + "rev": "cbd8a72e5fe6af19d40e2741dc440d9227836860", "type": "github" }, "original": { @@ -69,11 +85,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1770336287, - "narHash": "sha256-czvrg8uyf2VWRmbobsthTAIJCg1GH4mEekyW01AvHco=", + "lastModified": 1770509107, + "narHash": "sha256-YsfKRbd5fbcb2VTxywzAGpc4txXApMXfG0vtxEldt7Q=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "1cd999cdf20536ac6a6d1aa17ba0242eefd2312b", + "rev": "0bb52596f3ea543781d2c20b1c2ee495a174a7d5", "type": "github" }, "original": { @@ -85,11 +101,11 @@ "neovim-src": { "flake": false, "locked": { - "lastModified": 1770334851, - "narHash": "sha256-FvT3T0l8eNr1Hv+D1Sj1jM/2vLkonLxpadTk6gdYHAo=", + "lastModified": 1770505476, + "narHash": "sha256-HvlTxVEso/hl9lwweHerBRLtI/q05SQTxDr2l0Njfig=", "owner": "neovim", "repo": "neovim", - "rev": "db133879b2a115cdf982b2899f154f1851d59a60", + "rev": "ed8fbd2e2992cb264cb62585098a1c7acc5c4585", "type": "github" }, "original": { @@ -115,11 +131,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1770169770, - "narHash": "sha256-awR8qIwJxJJiOmcEGgP2KUqYmHG4v/z8XpL9z8FnT1A=", + "lastModified": 1770380644, + "narHash": "sha256-P7dWMHRUWG5m4G+06jDyThXO7kwSk46C1kgjEWcybkE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "aa290c9891fa4ebe88f8889e59633d20cc06a5f2", + "rev": "ae67888ff7ef9dff69b3cf0cc0fbfbcd3a722abe", "type": "github" }, "original": { @@ -131,11 +147,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1770169770, - "narHash": "sha256-awR8qIwJxJJiOmcEGgP2KUqYmHG4v/z8XpL9z8FnT1A=", + "lastModified": 1770380644, + "narHash": "sha256-P7dWMHRUWG5m4G+06jDyThXO7kwSk46C1kgjEWcybkE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "aa290c9891fa4ebe88f8889e59633d20cc06a5f2", + "rev": "ae67888ff7ef9dff69b3cf0cc0fbfbcd3a722abe", "type": "github" }, "original": { @@ -163,6 +179,7 @@ }, "root": { "inputs": { + "fonts": "fonts", "home-manager": "home-manager", "neovim-nightly": "neovim-nightly", "nixos-hardware": "nixos-hardware", @@ -176,11 +193,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1770382887, - "narHash": "sha256-on4vg7ctpMPzKWcvXPtV095aal6KUPDSKV9+I8HhQtY=", + "lastModified": 1770480420, + "narHash": "sha256-zm86JvwyurSk06eZD1/Cdc4eF84gWIxeOmBJ5iUxRHw=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "58aa8fb418e2853382d52453a6a7739125f2b8e0", + "rev": "d1540a889b63da17f735f1d4bebd9ebfcd7c267a", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 32b1a2c..9e7f587 100644 --- a/flake.nix +++ b/flake.nix @@ -10,9 +10,13 @@ nixos-hardware.url = "github:NixOS/nixos-hardware"; neovim-nightly.url = "github:nix-community/neovim-nightly-overlay"; zen-browser.url = "github:0xc000022070/zen-browser-flake"; + fonts = { + url = "git+ssh://git@github.com/barrettruth/fonts.git"; + flake = false; + }; }; - outputs = { nixpkgs, home-manager, nixos-hardware, neovim-nightly, zen-browser, ... }: + outputs = { nixpkgs, home-manager, nixos-hardware, neovim-nightly, zen-browser, fonts, ... }: let system = "x86_64-linux"; pkgs = import nixpkgs { @@ -22,6 +26,7 @@ "claude-code" "nvidia-x11" "nvidia-settings" + "apple_cursor" ]; overlays = [ neovim-nightly.overlays.default ]; }; @@ -37,7 +42,7 @@ home-manager.useUserPackages = true; home-manager.users.barrett = import ./home/home.nix; home-manager.extraSpecialArgs = { - inherit zen-browser system; + inherit zen-browser fonts system; }; } ]; @@ -49,7 +54,7 @@ homeConfigurations.barrett = home-manager.lib.homeManagerConfiguration { inherit pkgs; extraSpecialArgs = { - inherit zen-browser system; + inherit zen-browser fonts system; }; modules = [ ./home/home.nix ]; }; diff --git a/home/modules/git.nix b/home/modules/git.nix index 9385038..5450edc 100644 --- a/home/modules/git.nix +++ b/home/modules/git.nix @@ -1,4 +1,4 @@ -{ pkgs, config, ... }: +{ lib, config, pkgs, ... }: { programs.git = { @@ -35,6 +35,11 @@ ".claude/settings.local.json" ]; + signing = { + key = "A6C96C9349D2FC81"; + signByDefault = true; + }; + settings = { user = { name = "Barrett Ruth"; @@ -92,4 +97,67 @@ prompt = "enabled"; }; }; + + programs.ssh = { + enable = true; + matchBlocks = { + "github.com" = { + identityFile = "~/.ssh/id_ed25519"; + }; + "git-server" = { + hostname = "git.barrettruth.com"; + user = "ec2-user"; + identityFile = "~/.ssh/git-keypair-old.pem"; + }; + "lightsail" = { + hostname = "52.87.124.139"; + user = "ec2-user"; + identityFile = "~/.ssh/git-keypair.pem"; + extraOptions = { + SetEnv = "TERM=xterm-256color"; + KexAlgorithms = "+curve25519-sha256"; + }; + }; + "uva-portal" = { + hostname = "portal.cs.virginia.edu"; + user = "jxa9ev"; + identityFile = "~/.ssh/uva_key"; + }; + "uva-nvidia" = { + hostname = "grasshopper02.cs.virginia.edu"; + user = "jxa9ev"; + proxyJump = "uva-portal"; + identityFile = "~/.ssh/uva_key"; + }; + }; + }; + + programs.gpg.enable = true; + + services.gpg-agent = { + enable = true; + defaultCacheTtl = 3600; + maxCacheTtl = 7200; + pinentryPackage = pkgs.pinentry-curses; + }; + + home.activation.secretPermissions = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + if [ -d "${config.home.homeDirectory}/.ssh" ]; then + $DRY_RUN_CMD chmod 700 "${config.home.homeDirectory}/.ssh" + for f in "${config.home.homeDirectory}/.ssh/"*; do + [ -f "$f" ] || continue + [ -L "$f" ] && continue + case "$f" in + *.pub|*/known_hosts|*/known_hosts.old) + $DRY_RUN_CMD chmod 644 "$f" ;; + *) + $DRY_RUN_CMD chmod 600 "$f" ;; + esac + done + fi + if [ -d "${config.home.homeDirectory}/.gnupg" ]; then + $DRY_RUN_CMD find "${config.home.homeDirectory}/.gnupg" -type d -exec chmod 700 {} + + $DRY_RUN_CMD find "${config.home.homeDirectory}/.gnupg" -type f -exec chmod 600 {} + + fi + ''; } diff --git a/home/modules/shell.nix b/home/modules/shell.nix index cc70578..2c44d3f 100644 --- a/home/modules/shell.nix +++ b/home/modules/shell.nix @@ -356,7 +356,9 @@ in { unbind \'; bind \' splitw -hc '#{pane_current_path}' unbind \-; bind \- splitw -vc '#{pane_current_path}' - unbind y; bind y copy-mode + unbind y; bind y if -F '#{pane_in_mode}' 'send q' 'copy-mode' + unbind /; bind / if -F '#{pane_in_mode}' 'send q' 'copy-mode \; send /' + unbind ?; bind ? if -F '#{pane_in_mode}' 'send q' 'copy-mode \; send ?' bind -T copy-mode-vi v send -X begin-selection bind -T copy-mode-vi y send -X copy-pipe-and-cancel 'xclip -in -sel c' diff --git a/home/modules/theme.nix b/home/modules/theme.nix index e933bda..d181069 100644 --- a/home/modules/theme.nix +++ b/home/modules/theme.nix @@ -1,4 +1,4 @@ -{ lib, config, ... }: +{ lib, config, pkgs, fonts, ... }: let palettes = { @@ -46,5 +46,17 @@ in { readOnly = true; }; - config.colors = palettes.${config.theme}; + config = { + colors = palettes.${config.theme}; + + home.pointerCursor = { + name = "macOS"; + package = pkgs.apple-cursor; + size = 24; + gtk.enable = true; + x11.enable = true; + }; + + home.file.".local/share/fonts".source = fonts; + }; }