From e507ae78a43cdb49566f089f60ea34e43fa2ab93 Mon Sep 17 00:00:00 2001 From: Simon Hudson Date: Mon, 3 Nov 2025 10:36:58 +1100 Subject: [PATCH 1/3] All changes --- Makefile | 12 +- flake.nix | 4 +- machines/vm-shared.nix | 22 +- .../{jonochang => simon}/RectangleConfig.json | 0 users/{jonochang => simon}/Xresources | 0 users/{jonochang => simon}/alacritty.yml | 0 users/{jonochang => simon}/bashrc | 0 users/{jonochang => simon}/config.fish | 0 users/{jonochang => simon}/config.nu | 0 users/{jonochang => simon}/darwin.nix | 0 users/{jonochang => simon}/gdbinit | 0 users/{jonochang => simon}/ghostty.linux | 0 users/{jonochang => simon}/home-manager.nix | 189 +++++++----------- users/{jonochang => simon}/i3 | 2 +- users/{jonochang => simon}/i3status | 0 users/{jonochang => simon}/init.lua | 0 users/{jonochang => simon}/inputrc | 0 users/{jonochang => simon}/jujutsu.toml | 0 users/{jonochang => simon}/kitty | 0 users/{jonochang => simon}/neovim.nix | 0 users/{jonochang => simon}/nixos.nix | 6 +- users/{jonochang => simon}/omp.json | 0 users/{jonochang => simon}/rofi | 0 users/{jonochang => simon}/textobjects.scm | 0 24 files changed, 96 insertions(+), 139 deletions(-) rename users/{jonochang => simon}/RectangleConfig.json (100%) rename users/{jonochang => simon}/Xresources (100%) rename users/{jonochang => simon}/alacritty.yml (100%) rename users/{jonochang => simon}/bashrc (100%) rename users/{jonochang => simon}/config.fish (100%) rename users/{jonochang => simon}/config.nu (100%) rename users/{jonochang => simon}/darwin.nix (100%) rename users/{jonochang => simon}/gdbinit (100%) rename users/{jonochang => simon}/ghostty.linux (100%) rename users/{jonochang => simon}/home-manager.nix (70%) rename users/{jonochang => simon}/i3 (98%) rename users/{jonochang => simon}/i3status (100%) rename users/{jonochang => simon}/init.lua (100%) rename users/{jonochang => simon}/inputrc (100%) rename users/{jonochang => simon}/jujutsu.toml (100%) rename users/{jonochang => simon}/kitty (100%) rename users/{jonochang => simon}/neovim.nix (100%) rename users/{jonochang => simon}/nixos.nix (53%) rename users/{jonochang => simon}/omp.json (100%) rename users/{jonochang => simon}/rofi (100%) rename users/{jonochang => simon}/textobjects.scm (100%) diff --git a/Makefile b/Makefile index c27d8e40..fdf73245 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,13 @@ # Connectivity info for Linux VM -NIXADDR ?= unset +NIXADDR ?= dev.local NIXPORT ?= 22 -NIXUSER ?= jonochang +NIXUSER ?= simon # Get the path to this Makefile and directory MAKEFILE_DIR := $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))) # The name of the nixosConfiguration in the flake -NIXNAME ?= vm-intel +NIXNAME ?= vm-aarch64 # SSH options that are used. These aren't meant to be overridden but are # reused a lot so we just store them up here. @@ -121,12 +121,6 @@ vm/secrets: rsync -av -e 'ssh $(SSH_OPTIONS)' \ --exclude='environment' \ $(HOME)/.aws/ $(NIXUSER)@$(NIXADDR):~/.aws - # GPG keyring - rsync -av -e 'ssh $(SSH_OPTIONS)' \ - --exclude='.#*' \ - --exclude='S.*' \ - --exclude='*.conf' \ - $(HOME)/.gnupg/ $(NIXUSER)@$(NIXADDR):~/.gnupg # SSH keys rsync -av -e 'ssh $(SSH_OPTIONS)' \ --exclude='environment' \ diff --git a/flake.nix b/flake.nix index 4da313ae..8fd118ac 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "NixOS systems and tools by mitchellh and jonochang"; + description = "NixOS systems and tools by mitchellh and simon hudson"; inputs = { # Pin our primary nixpkgs repository. This is the main nixpkgs repository @@ -89,7 +89,7 @@ in { nixosConfigurations.vm-aarch64 = mkSystem "vm-aarch64" { system = "aarch64-linux"; - user = "jonochang"; + user = "simon"; }; # nixosConfigurations.vm-aarch64-prl = mkSystem "vm-aarch64-prl" rec { diff --git a/machines/vm-shared.nix b/machines/vm-shared.nix index a2d99ad1..80edaf06 100644 --- a/machines/vm-shared.nix +++ b/machines/vm-shared.nix @@ -22,9 +22,9 @@ # this, use your own, or toss it. Its typically safe to use a binary cache # since the data inside is checksummed. settings = { - trusted-substituters = ["ssh-ng://jono@tsuruhashi" "https://mitchellh-nixos-config.cachix.org" "https://cache.nixos.org/"]; + trusted-substituters = ["ssh-ng://simon@tsuruhashi" "https://mitchellh-nixos-config.cachix.org" "https://cache.nixos.org/"]; trusted-public-keys = ["silverpond:DvvEdyKZvc86cR1o/a+iJxnb7JxMCBzvSTjjEQIY8+g=" "mitchellh-nixos-config.cachix.org-1:bjEbXJyLrL1HZZHBbO4QALnI5faYZppzkU4D2s0G8RQ=" "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="]; - trusted-users = ["jonochang"]; + trusted-users = ["simon"]; }; }; @@ -45,6 +45,15 @@ networking.hostName = "dev"; networking.nameservers = [ "1.1.1.1" "1.0.0.1" ]; + networking.hosts = { + "10.0.0.120" = [ "minio" ]; + }; + + services.avahi.enable = true; + services.avahi.nssmdns4 = true; + services.avahi.publish.addresses = true; + services.avahi.publish.enable = true; + # Set your time zone. time.timeZone = "Australia/Melbourne"; @@ -165,4 +174,13 @@ # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "20.09"; # Did you read the comment? + + services.dnsmasq = { + enable = true; + settings = { + listen-address = "0.0.0.0"; + bind-interfaces = true; + address = "/dev.local/172.16.20.128"; # VM's own IP + }; + }; } diff --git a/users/jonochang/RectangleConfig.json b/users/simon/RectangleConfig.json similarity index 100% rename from users/jonochang/RectangleConfig.json rename to users/simon/RectangleConfig.json diff --git a/users/jonochang/Xresources b/users/simon/Xresources similarity index 100% rename from users/jonochang/Xresources rename to users/simon/Xresources diff --git a/users/jonochang/alacritty.yml b/users/simon/alacritty.yml similarity index 100% rename from users/jonochang/alacritty.yml rename to users/simon/alacritty.yml diff --git a/users/jonochang/bashrc b/users/simon/bashrc similarity index 100% rename from users/jonochang/bashrc rename to users/simon/bashrc diff --git a/users/jonochang/config.fish b/users/simon/config.fish similarity index 100% rename from users/jonochang/config.fish rename to users/simon/config.fish diff --git a/users/jonochang/config.nu b/users/simon/config.nu similarity index 100% rename from users/jonochang/config.nu rename to users/simon/config.nu diff --git a/users/jonochang/darwin.nix b/users/simon/darwin.nix similarity index 100% rename from users/jonochang/darwin.nix rename to users/simon/darwin.nix diff --git a/users/jonochang/gdbinit b/users/simon/gdbinit similarity index 100% rename from users/jonochang/gdbinit rename to users/simon/gdbinit diff --git a/users/jonochang/ghostty.linux b/users/simon/ghostty.linux similarity index 100% rename from users/jonochang/ghostty.linux rename to users/simon/ghostty.linux diff --git a/users/jonochang/home-manager.nix b/users/simon/home-manager.nix similarity index 70% rename from users/jonochang/home-manager.nix rename to users/simon/home-manager.nix index c2d06ba7..afe4ca8d 100644 --- a/users/jonochang/home-manager.nix +++ b/users/simon/home-manager.nix @@ -7,21 +7,35 @@ let isDarwin = pkgs.stdenv.isDarwin; isLinux = pkgs.stdenv.isLinux; shellAliases = { - ga = "git add"; - gc = "git commit"; - gco = "git checkout"; - gcp = "git cherry-pick"; - gdiff = "git diff"; - gl = "git prettylog"; - gp = "git push"; - gs = "git status"; - gt = "git tag"; - - jd = "jj desc"; - jf = "jj git fetch"; - jn = "jj new"; - jp = "jj git push"; - js = "jj st"; + ll="ls -alF"; + gs="git status"; + ga="git add"; + t="tmux"; + gb="git branch"; + gd="git diff"; + gl="git log"; + gf="git fetch"; + gpl="git pull"; + gps="git push"; + gc="git commit"; + gcm="git commit -m"; + gco="git checkout"; + gtg="git tag"; + gst="git stash"; + gsta="git stash apply"; + gstp="git stash pop"; + grb="git rebase"; + grst="git restore --staged"; + nv="nvim"; + vim="nvim"; + are="ssh t-ares"; + art="ssh t-artemis"; + ze="ssh t-zeus"; + ath="ssh t-athena"; + di="ssh t-dionysus"; + ns="nix-shell"; + hlr="hl-run"; + hlrs="hl-run rails s"; } // (if isLinux then { # Two decades of using a Mac has made this such a strong memory # that I'm just going to keep it consistent. @@ -67,6 +81,7 @@ in { pkgs.atuin pkgs.asciinema pkgs.bat + pkgs.opencode pkgs.eza pkgs.fd pkgs.fzf @@ -83,6 +98,7 @@ in { pkgs.ffmpeg pkgs.timg pkgs.mpv + pkgs.tmux pkgs.tokei pkgs.tree pkgs.watch @@ -167,42 +183,6 @@ in { shellAliases = shellAliases; }; - # programs.direnv= { - # enable = true; - - # config = { - # whitelist = { - # prefix= [ - # "$HOME/code/go/src/github.com/hashicorp" - # "$HOME/code/go/src/github.com/mitchellh" - # ]; - - # exact = ["$HOME/.envrc"]; - # }; - # }; - # }; - - # programs.fish = { - # enable = true; - # shellAliases = shellAliases; - # interactiveShellInit = lib.strings.concatStrings (lib.strings.intersperse "\n" ([ - # "source ${inputs.theme-bobthefish}/functions/fish_prompt.fish" - # "source ${inputs.theme-bobthefish}/functions/fish_right_prompt.fish" - # "source ${inputs.theme-bobthefish}/functions/fish_title.fish" - # (builtins.readFile ./config.fish) - # "set -g SHELL ${pkgs.fish}/bin/fish" - # ])); - - # plugins = map (n: { - # name = n; - # src = inputs.${n}; - # }) [ - # "fish-fzf" - # "fish-foreign-env" - # "theme-bobthefish" - # ]; - # }; - programs.zsh = { enable = true; enableCompletion = true; @@ -221,22 +201,7 @@ in { defaultKeymap = "viins"; - shellAliases = { - j = "just"; - ls = "exa"; - ll = "exa -l --header"; - la = "exa -a"; - lt = "exa --tree"; - lla = "exa -la --header"; - ".." = "cd .."; - rdme-glow = "glow -p https://github.com/charmbracelet/glow"; - rdme-git-extras = "glow -p https://github.com/tj/git-extras/blob/master/Commands.md"; - rdme-just = "glow -p https://raw.githubusercontent.com/casey/just/master/README.adoc"; - - # sg = "BROWSER=w3m ddgr --unsafe --noua \!g "; - # ssg = "ddgr --unsafe --noua \!g "; - # sd = "BROWSER=w3m ddgr --unsafe --noua "; - }; + shellAliases = shellAliases; initExtra = " # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. @@ -285,7 +250,7 @@ in { enable = true; plugins = [ - "git ripgrep tig ssh-agent" + "git tig ssh-agent" ]; }; @@ -305,8 +270,8 @@ in { programs.git = { enable = true; - userName = "Jono Chang"; - userEmail = "j.g.chang@gmail.com"; + userName = "Simon Hudson"; + userEmail = "simon.hudson@silverpond.com.au"; # signing = { # key = "523D5DC389D273BC"; # signByDefault = true; @@ -321,7 +286,7 @@ in { color.ui = true; core.askPass = ""; # needs to be empty to use terminal for ask pass credential.helper = "store"; # want to make this more secure - github.user = "jonochang"; + github.user = "simon"; push.default = "tracking"; init.defaultBranch = "main"; }; @@ -330,38 +295,12 @@ in { programs.go = { enable = true; goPath = "code/go"; - goPrivate = [ "github.com/jonochang" ]; + goPrivate = [ "github.com/simon" ]; }; programs.jujutsu = { enable = true; - # I don't use "settings" because the path is wrong on macOS at - # the time of writing this. - }; - - # programs.alacritty = { - # enable = !isWSL; - - # settings = { - # env.TERM = "xterm-256color"; - - # key_bindings = [ - # { key = "K"; mods = "Command"; chars = "ClearHistory"; } - # { key = "V"; mods = "Command"; action = "Paste"; } - # { key = "C"; mods = "Command"; action = "Copy"; } - # { key = "Key0"; mods = "Command"; action = "ResetFontSize"; } - # { key = "Equals"; mods = "Command"; action = "IncreaseFontSize"; } - # { key = "Subtract"; mods = "Command"; action = "DecreaseFontSize"; } - # ]; - # }; - # }; - - # programs.kitty = { - # enable = !isWSL; - # extraConfig = builtins.readFile ./kitty; - # }; - programs.i3status = { enable = isLinux && !isWSL; @@ -379,31 +318,37 @@ in { }; }; - # programs.neovim = { - # enable = true; - # package = inputs.neovim-nightly-overlay.packages.${pkgs.system}.default; - # }; - - # programs.atuin = { - # enable = true; - # }; - - # programs.nushell = { - # enable = true; - # }; - - # programs.oh-my-posh = { - # enable = true; - # }; - - # services.gpg-agent = { - # enable = isLinux; - # pinentry.package = pkgs.pinentry-tty; + programs.tmux = { + enable = true; - # # cache the keys forever so we don't get asked for a password - # defaultCacheTtl = 31536000; - # maxCacheTtl = 31536000; - # }; + # Basic settings + clock24 = true; + baseIndex = 1; + keyMode = "vi"; + mouse = true; + terminal = "screen-256color"; + + # Custom configuration + extraConfig = '' + set-option -g history-limit 10000 + + # Set prefix to Ctrl-Space instead of Ctrl-b + unbind C-b + set -g prefix C-Space + bind Space send-prefix + + setw -g mode-keys vi + set-option -sg escape-time 10 + + set -g @plugin 'tmux-plugins/tpm' + set -g @plugin 'tmux-plugins/tmux-sensible' + set -g @plugin 'tmux-plugins/tmux-resurrect' + set -g @resurrect-strategy-nvim 'session' + + # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) + run '~/.tmux/plugins/tpm/tpm' + ''; + }; xresources.extraConfig = builtins.readFile ./Xresources; diff --git a/users/jonochang/i3 b/users/simon/i3 similarity index 98% rename from users/jonochang/i3 rename to users/simon/i3 index f75c2019..1b84996f 100644 --- a/users/jonochang/i3 +++ b/users/simon/i3 @@ -62,7 +62,7 @@ bindsym $mod+d split h bindsym $mod+Shift+d split v # temp, hacking on a tty -bindsym $mod+Shift+n exec /home/jonochang/bin/devtty --config-file=/home/jonochang/.config/devtty/config +bindsym $mod+Shift+n exec /home/simon/bin/devtty --config-file=/home/simon/.config/devtty/config # kill focused window bindsym $mod+w kill diff --git a/users/jonochang/i3status b/users/simon/i3status similarity index 100% rename from users/jonochang/i3status rename to users/simon/i3status diff --git a/users/jonochang/init.lua b/users/simon/init.lua similarity index 100% rename from users/jonochang/init.lua rename to users/simon/init.lua diff --git a/users/jonochang/inputrc b/users/simon/inputrc similarity index 100% rename from users/jonochang/inputrc rename to users/simon/inputrc diff --git a/users/jonochang/jujutsu.toml b/users/simon/jujutsu.toml similarity index 100% rename from users/jonochang/jujutsu.toml rename to users/simon/jujutsu.toml diff --git a/users/jonochang/kitty b/users/simon/kitty similarity index 100% rename from users/jonochang/kitty rename to users/simon/kitty diff --git a/users/jonochang/neovim.nix b/users/simon/neovim.nix similarity index 100% rename from users/jonochang/neovim.nix rename to users/simon/neovim.nix diff --git a/users/jonochang/nixos.nix b/users/simon/nixos.nix similarity index 53% rename from users/jonochang/nixos.nix rename to users/simon/nixos.nix index 6c2e5e07..e0e270c6 100644 --- a/users/jonochang/nixos.nix +++ b/users/simon/nixos.nix @@ -10,14 +10,14 @@ # Since we're using fish as our shell programs.zsh.enable = true; - users.users.jonochang = { + users.users.simon = { isNormalUser = true; - home = "/home/jonochang"; + home = "/home/simon"; extraGroups = [ "docker" "lxd" "wheel" ]; shell = pkgs.zsh; hashedPassword = "$6$wU04qVoXnnAsStf5$I0LYbQUbacScbFdvZDPif5zu2/.xAUQAhAE7.qLa6HUdeG4sVjIBW9bzYuL0SVfAFFQiYh37DSDkqY3t/jKs/0"; openssh.authorizedKeys.keys = [ - "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAw2L3BWpEHXNl8jFbEdizEkKt2eAM6ExCWuGxBWKDAZ295F+DqiD3Lv+jJzxvH/wuyRs9UJn9XkIEc8MRP8uGv0mW5ad1msCnkoCIDGdQfEM4jgBx4chrLYbUdm4+A08uwsukmvQFbJMHSQ/2dS62WEz69urSFHwFZzzFGoxw2cYLVZpkc621Q4FN3FvUlhchfyLx35wK5qQ6HB0Ceeeb1MkciwoMSnbE6O7qhDqkdAAgItgiS9HrQwe1woBdK0oxqHSYVPaUc+/h5FC8grKcUV7VTsuytTtHxqsR/tmGQ5az3qn2xDw1hrR6n0vLvTpvmQ0fG3xrrMn14D6mes9DKQ== jonochang@kirillrdy-imac.local" + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDmfh7QXsvyfWLc86DfFew9DDCV4eriZYrSfy+XrxJdrohV3dHX3VKwTSNEPqDXBDvP99Dhaoqvp8orb1JkLMkLejSUXQKRNltcoPpykj5XcE0ysaUXye9tvtTWAkVbG74E5uRzumbtxoe3RuktilMuFPDiGwSzNHT5FuitrI3gjfums7c87plkcFmuAqiArPjTOVchSXQrx8mihm2NnIothjguvvwlnWcJbM7/CYioNoDqRj1TuPZ0w/3G6/FgnRNx3CFxfujXB0etx6W4wGf6Jt7J9dk0fvKddDUiQoEEDJqH56C+O/rqlODOxyZlnAZS7Ds/YJvECJHgiEqOXwSL simon.hudson@silverpond.com.au" ]; }; } diff --git a/users/jonochang/omp.json b/users/simon/omp.json similarity index 100% rename from users/jonochang/omp.json rename to users/simon/omp.json diff --git a/users/jonochang/rofi b/users/simon/rofi similarity index 100% rename from users/jonochang/rofi rename to users/simon/rofi diff --git a/users/jonochang/textobjects.scm b/users/simon/textobjects.scm similarity index 100% rename from users/jonochang/textobjects.scm rename to users/simon/textobjects.scm From 47256d2265f51001ac40e9913783473889dd5c5d Mon Sep 17 00:00:00 2001 From: Simon Hudson Date: Fri, 21 Nov 2025 10:47:41 +1100 Subject: [PATCH 2/3] Formatting from linter --- users/simon/home-manager.nix | 153 ++++++++++++++++++++++------------- 1 file changed, 98 insertions(+), 55 deletions(-) diff --git a/users/simon/home-manager.nix b/users/simon/home-manager.nix index afe4ca8d..6faba27a 100644 --- a/users/simon/home-manager.nix +++ b/users/simon/home-manager.nix @@ -1,56 +1,76 @@ { isWSL, inputs, ... }: -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let sources = import ../../nix/sources.nix; isDarwin = pkgs.stdenv.isDarwin; isLinux = pkgs.stdenv.isLinux; shellAliases = { - ll="ls -alF"; - gs="git status"; - ga="git add"; - t="tmux"; - gb="git branch"; - gd="git diff"; - gl="git log"; - gf="git fetch"; - gpl="git pull"; - gps="git push"; - gc="git commit"; - gcm="git commit -m"; - gco="git checkout"; - gtg="git tag"; - gst="git stash"; - gsta="git stash apply"; - gstp="git stash pop"; - grb="git rebase"; - grst="git restore --staged"; - nv="nvim"; - vim="nvim"; - are="ssh t-ares"; - art="ssh t-artemis"; - ze="ssh t-zeus"; - ath="ssh t-athena"; - di="ssh t-dionysus"; - ns="nix-shell"; - hlr="hl-run"; - hlrs="hl-run rails s"; - } // (if isLinux then { - # Two decades of using a Mac has made this such a strong memory - # that I'm just going to keep it consistent. - pbcopy = "xclip"; - pbpaste = "xclip -o"; - } else {}); + ll = "ls -alF"; + gs = "git status"; + ga = "git add"; + t = "tmux"; + gb = "git branch"; + gd = "git diff"; + gl = "git log"; + gf = "git fetch"; + gpl = "git pull"; + gps = "git push"; + gc = "git commit"; + gcm = "git commit -m"; + gco = "git checkout"; + gtg = "git tag"; + gst = "git stash"; + gsta = "git stash apply"; + gstp = "git stash pop"; + grb = "git rebase"; + grs = "git restore"; + grst = "git restore --staged"; + nv = "nvim"; + vim = "nvim"; + are = "ssh t-ares"; + art = "ssh t-artemis"; + ze = "ssh t-zeus"; + ath = "ssh t-athena"; + di = "ssh t-dionysus"; + ns = "nix-shell"; + hlr = "hl-run"; + hlrs = "hl-run rails s"; + } + // ( + if isLinux then + { + # Two decades of using a Mac has made this such a strong memory + # that I'm just going to keep it consistent. + pbcopy = "xclip"; + pbpaste = "xclip -o"; + } + else + { } + ); # For our MANPAGER env var # https://github.com/sharkdp/bat/issues/1145 - manpager = (pkgs.writeShellScriptBin "manpager" (if isDarwin then '' - sh -c 'col -bx | bat -l man -p' - '' else '' - cat "$1" | col -bx | bat --language man --style plain - '')); -in { + manpager = ( + pkgs.writeShellScriptBin "manpager" ( + if isDarwin then + '' + sh -c 'col -bx | bat -l man -p' + '' + else + '' + cat "$1" | col -bx | bat --language man --style plain + '' + ) + ); +in +{ # Home-manager 22.11 requires this be set. We never set it so we have # to use the old state version. home.stateVersion = "18.09"; @@ -126,7 +146,8 @@ in { # This is automatically setup on Linux pkgs.cachix pkgs.tailscale - ]) ++ (lib.optionals (isLinux && !isWSL) [ + ]) + ++ (lib.optionals (isLinux && !isWSL) [ pkgs.chromium pkgs.firefox pkgs.rofi @@ -149,10 +170,16 @@ in { AMP_API_KEY = "op://Private/Amp_API/credential"; OPENAI_API_KEY = "op://Private/OpenAPI_Personal/credential"; - } // (if isDarwin then { - # See: https://github.com/NixOS/nixpkgs/issues/390751 - DISPLAY = "nixpkgs-390751"; - } else {}); + } + // ( + if isDarwin then + { + # See: https://github.com/NixOS/nixpkgs/issues/390751 + DISPLAY = "nixpkgs-390751"; + } + else + { } + ); home.file = { ".gdbinit".source = ./gdbinit; @@ -162,12 +189,24 @@ in { xdg.configFile = { "i3/config".text = builtins.readFile ./i3; "rofi/config.rasi".text = builtins.readFile ./rofi; - } // (if isDarwin then { - # Rectangle.app. This has to be imported manually using the app. - "rectangle/RectangleConfig.json".text = builtins.readFile ./RectangleConfig.json; - } else {}) // (if isLinux then { - "ghostty/config".text = builtins.readFile ./ghostty.linux; - } else {}); + } + // ( + if isDarwin then + { + # Rectangle.app. This has to be imported manually using the app. + "rectangle/RectangleConfig.json".text = builtins.readFile ./RectangleConfig.json; + } + else + { } + ) + // ( + if isLinux then + { + "ghostty/config".text = builtins.readFile ./ghostty.linux; + } + else + { } + ); #--------------------------------------------------------------------- # Programs @@ -177,8 +216,11 @@ in { programs.bash = { enable = true; - shellOptions = []; - historyControl = [ "ignoredups" "ignorespace" ]; + shellOptions = [ ]; + historyControl = [ + "ignoredups" + "ignorespace" + ]; initExtra = builtins.readFile ./bashrc; shellAliases = shellAliases; }; @@ -300,6 +342,7 @@ in { programs.jujutsu = { enable = true; + }; programs.i3status = { enable = isLinux && !isWSL; From 14e95a1f4c0d3e6fd04c19a4daa5c421d99696c4 Mon Sep 17 00:00:00 2001 From: Simon Hudson Date: Fri, 21 Nov 2025 10:48:09 +1100 Subject: [PATCH 3/3] Add python, LSPs --- users/simon/home-manager.nix | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/users/simon/home-manager.nix b/users/simon/home-manager.nix index 6faba27a..233c451c 100644 --- a/users/simon/home-manager.nix +++ b/users/simon/home-manager.nix @@ -94,6 +94,13 @@ in # per-project flakes sourced with direnv and nix-shell, so this is # not a huge list. home.packages = [ + (pkgs.python3.withPackages ( + ps: with ps; [ + pip + virtualenv + # Add other Python packages here + ] + )) pkgs.awscli2 pkgs.awsebcli @@ -142,7 +149,18 @@ in # Node is required for Copilot.vim pkgs.nodejs - ] ++ (lib.optionals isDarwin [ + + pkgs.solargraph + pkgs.nil + pkgs.lua-language-server + pkgs.pyright + pkgs.typescript-language-server + pkgs.golangci-lint-langserver + pkgs.superhtml + pkgs.pyrefly + pkgs.zls + ] + ++ (lib.optionals isDarwin [ # This is automatically setup on Linux pkgs.cachix pkgs.tailscale