authorgravatar for git@paperclover.netclover caruso <git@paperclover.net> 2025-09-24 11:59:26-07:00
committergravatar for git@paperclover.netclover caruso <git@paperclover.net> 2025-09-24 12:11:14-07:00
log168c36042b1a70c406e4d195d34c20c482a3cde3
tree7e89798aadbe4e982e316bb235b0591d6f69fe19
parentf4817e31485e763cdf2dad6b021895f964033aba
signature Signed by SSH key SHA256:xbd+BjjhyBfwk7GVoURf9Yx0gzDerHbvYv7SddNWmAs

clover: setup work environment

switch command gets some new features to account for the fact my work device hostname contains info about the company i work for.

6 files changed, 49 insertions(+), 20 deletions(-)

.gitignore+2-1
...@@ -1,4 +1,5 @@...@@ -1,4 +1,5 @@
1flake.lock
2.DS_STORE1.DS_STORE
2.hostname
3flake.lock
3result4result
4result-*5result-*
flake.nix+6
...@@ -133,6 +133,12 @@...@@ -133,6 +133,12 @@
133 host = "paperback";133 host = "paperback";
134 system = "aarch64-darwin";134 system = "aarch64-darwin";
135 };135 };
136 # clover's work macbook pro
137 darwinConfigurations.clover-work-mac = mkSystem "clover-work-mac" {
138 user = "clover";
139 host = "work";
140 system = "aarch64-darwin";
141 };
136142
137 # fish's cattop143 # fish's cattop
138 nixosConfigurations.cattop = mkSystem "cattop" {144 nixosConfigurations.cattop = mkSystem "cattop" {
switch+16-5
...@@ -1,12 +1,23 @@...@@ -1,12 +1,23 @@
1#!/bin/sh1#!/bin/sh
2nh_subcommand="os"2nh_subcommand="os"
3fallback_command="nixos-rebuild"3fallback_command="nixos-rebuild"
4if [ "$(uname -o)" = "darwin" ]; then4hostname_file="$(dirname "$0")/.hostname"
5 nh_subcommand="darwin"5if [ -n "$1" ]; then
6 fallback_command="nix run .#darwin-rebuild"6 hostname="$1"
7elif [ -f "$hostname_file" ]; then
8 hostname=$(cat "$hostname_file")
9fi
10if [ -z "$hostname" ]; then
11 hostname="$(hostname)"
12fi
13printf "%s" "$hostname" >"$hostname_file"
14if [ "$(uname -o)" = "Darwin" ]; then
15 nh_subcommand="darwin"
16 fallback_command="nix run .#darwin-rebuild"
17 hostname="darwinConfigurations.$hostname"
7fi18fi
8if command -v nh >/dev/null; then19if command -v nh >/dev/null; then
9 nh $nh_subcommand switch .20 nh $nh_subcommand switch '.#'"$hostname"
10else21else
11 $fallback_command -- switch --flake .22 $fallback_command -- switch --flake '.#'"$hostname"
12fi23fi
users/clover/home.nix+2-10
...@@ -10,9 +10,7 @@ in...@@ -10,9 +10,7 @@ in
10 let10 let
11 # packages to always install11 # packages to always install
12 all = [12 all = [
13 (ffmpeg.override {13 ffmpeg-full
14 withSvtav1 = true;
15 })
16 ripgrep14 ripgrep
17 uv15 uv
18 nh16 nh
...@@ -22,6 +20,7 @@ in...@@ -22,6 +20,7 @@ in
22 desktop = [20 desktop = [
23 git-town21 git-town
24 lazygit22 lazygit
23 jjui
25 ];24 ];
26 # packages to install on all servers25 # packages to install on all servers
27 server = [ ];26 server = [ ];
...@@ -278,12 +277,5 @@ in...@@ -278,12 +277,5 @@ in
278 "nas.paperclover.net" = zenith;277 "nas.paperclover.net" = zenith;
279 };278 };
280 };279 };
281 neovide = {
282 enable = !hostServer;
283 settings = {
284 font.normal = "AT Name Mono";
285 font.size = 13;
286 };
287 };
288 };280 };
289}281}
users/clover/paperback/home.nix-4
...@@ -3,7 +3,6 @@...@@ -3,7 +3,6 @@
3 # these programs are not globally installed to reduce distractions.3 # these programs are not globally installed to reduce distractions.
4 # most of these are needed for my work environment.4 # most of these are needed for my work environment.
5 programs = {5 programs = {
6 bun.enable = true;
7 zsh.profileExtra = ''6 zsh.profileExtra = ''
8 _bun() {7 _bun() {
9 local context state line8 local context state line
...@@ -12,7 +11,6 @@...@@ -12,7 +11,6 @@
12 '';11 '';
13 };12 };
14 home.packages = with pkgs; [13 home.packages = with pkgs; [
15 doppler
16 deno14 deno
17 nodejs_2215 nodejs_22
18 rustup16 rustup
...@@ -22,7 +20,5 @@...@@ -22,7 +20,5 @@
22 yt-dlp20 yt-dlp
23 spotdl21 spotdl
24 zig22 zig
25 ssm-session-manager-plugin
26 awscli
27 ];23 ];
28}24}
users/clover/work/home.nix created+23
...@@ -0,0 +1,23 @@
1{ pkgs, ... }:
2{
3 programs = {
4 zsh.profileExtra = ''
5 _bun() {
6 local context state line
7 _arguments -C '*:file:_files'
8 }
9 '';
10 };
11 home.packages = with pkgs; [
12 (bun.overrideAttrs (_: {
13 version = "1.1.17"; # blocked on bugs
14 }))
15 doppler
16 deno
17 nodejs_24
18 rustup
19 typescript
20 ssm-session-manager-plugin
21 awscli
22 ];
23}