Skip to content

Commit 4febbba

Browse files
committed
wip
1 parent 71a2d2c commit 4febbba

File tree

6 files changed

+151
-70
lines changed

6 files changed

+151
-70
lines changed

bin/home-manager-flake-switch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# [[file:../workstation.org::*flake-world equivalent to home-manager 'switch'][flake-world equivalent to home-manager 'switch':1]]
1212
set -u # error in case WORKSTATION_NAME is not set
1313
function home_manager_flake_switch() {
14-
nix build --no-link ~/workstation/#homeConfigurations.${WORKSTATION_NAME}.$(whoami).activationPackage --show-trace && \
14+
nix build --debug -L -v --no-link ~/workstation/#homeConfigurations.${WORKSTATION_NAME}.$(whoami).activationPackage --show-trace && \
1515
"$(nix path-info ~/workstation/#homeConfigurations.${WORKSTATION_NAME}.$(whoami).activationPackage)"/activate --show-trace
1616
}
1717
home_manager_flake_switch

dotfiles/doom.d/config.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@
6666
(setq global-flycheck-mode nil)
6767

6868
(load-theme 'tsdh-light)
69-
69+
(toggle-debug-on-error)
70+
(toggle-debug-on-quit)
7071

7172
;; (add-to-list 'load-path "~/Projects/shen-elisp/")
7273
;; (require 'shen-elisp)

dotfiles/zshrc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ export HISTSIZE=10000
2222
# TODO figure out how to make this work in zsh
2323
# shopt -s histappend
2424

25-
do_command_done_alert() {
26-
osascript -e 'display dialog "Command Done!"'
27-
}
28-
2925
alert_when_done() {
3026
if test -n "$1";
3127
then
@@ -34,7 +30,7 @@ alert_when_done() {
3430
sleep 1
3531
done
3632
fi
37-
do_command_done_alert
33+
notify.sh "command $1 has exited"
3834
}
3935

4036
sourceIfExists ~/etc/machine-settings.sh

flake.lock

Lines changed: 43 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 80 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33

44
inputs = {
55
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
6+
# nixpkgs.url = "git+file:///Users/joel/Projects/nixpkgs";
67
darwin-nixpkgs = {
7-
url = "github:nixos/nixpkgs/nixpkgs-22.11-darwin";
8+
url = "git+file:///Users/joel/Projects/nixpkgs";
89
};
910
darwin.url = "github:lnl7/nix-darwin/master";
1011
darwin.inputs.nixpkgs.follows = "darwin-nixpkgs";
@@ -17,14 +18,22 @@
1718
inputs.nixpkgs.follows = "nixpkgs";
1819
};
1920
nix-doom-emacs = {
20-
url = "github:nix-community/nix-doom-emacs";
21+
url = "git+file:///Users/joel/Projects/nix-doom-emacs";
22+
inputs = {
23+
nixpkgs.follows = "nixpkgs";
24+
25+
26+
doom-emacs.url = "git+file:///Users/joel/Projects/doomemacs";
27+
nix-straight.url = "git+file:///Users/joel/Projects/nix-straight.el";
28+
};
2129
};
2230
};
2331

24-
outputs = inputs@{ self, darwin, nixpkgs, darwin-nixpkgs, home-manager, darwin-home-manager, nix-doom-emacs, # darwin-nix-doom-emacs,
32+
outputs = inputs@{ self, darwin, nixpkgs, darwin-nixpkgs, home-manager, darwin-home-manager, nix-doom-emacs,
2533
... }:
2634

2735
let
36+
2837
home-manager-config = { user, home }:
2938
{ config, pkgs, lib, ... }:
3039
{
@@ -72,22 +81,73 @@
7281
(add-to-list 'exec-path "~/.nix-profile/bin/")
7382
'';
7483

75-
emacsPackagesOverlay = self: super: {
76-
# https://github.com/doomemacs/doomemacs/blob/07fca786154551f90f36535bfb21f8ca4abd5027/modules/completion/vertico/packages.el#L4C18-L7
77-
vertico = self.trivialBuild {
78-
pname = "vertico";
79-
ename = "vertico";
80-
version = "2ad46196653b8a873adf11aee949d621af8ff6bc";
81-
packageRequires = [ super.compat super.emacs ];
82-
src = pkgs.fetchFromGitHub {
83-
owner = "minad";
84-
repo = "vertico";
85-
rev = "2ad46196653b8a873adf11aee949d621af8ff6bc";
86-
sha256 = "sha256-8vsNZKSWY6AcLs/a8/b9tjmkF2LEeRSAOvsdiWq+cAc=";
87-
88-
};
89-
};
90-
};
84+
# emacsPackagesOverlay = self: super: {
85+
# embark = self.trivialBuild {
86+
# pname = "embark";
87+
# ename = "embark";
88+
# version = "5d0459d27aa7cf738b5af36cf862723a62bef955";
89+
# packageRequires = [ super.compat super.emacs ];
90+
# src = pkgs.fetchFromGitHub {
91+
# owner = "oantolin";
92+
# repo = "embark";
93+
# rev = "5d0459d27aa7cf738b5af36cf862723a62bef955";
94+
# sha256 = "sha256-7U94GRmUA+UdqvwSBSEGSwHSpfqaaiKghqg4P4gn85c=";
95+
# };
96+
# meta = {
97+
# homepage = "https://elpa.gnu.org/packages/embark.html";
98+
# license = lib.licenses.free;
99+
# };
100+
101+
# };
102+
# # https://github.com/doomemacs/doomemacs/blob/07fca786154551f90f36535bfb21f8ca4abd5027/modules/completion/vertico/packages.el#L4C18-L7
103+
# vertico = self.trivialBuild {
104+
# pname = "vertico";
105+
# ename = "vertico";
106+
# version = "2ad46196653b8a873adf11aee949d621af8ff6bc";
107+
# packageRequires = [ super.compat super.emacs ];
108+
# src = pkgs.fetchFromGitHub {
109+
# owner = "minad";
110+
# repo = "vertico";
111+
# rev = "2ad46196653b8a873adf11aee949d621af8ff6bc";
112+
# sha256 = "sha256-8vsNZKSWY6AcLs/a8/b9tjmkF2LEeRSAOvsdiWq+cAc=";
113+
# };
114+
# meta = {
115+
# homepage = "https://elpa.gnu.org/packages/vertico.html";
116+
# license = lib.licenses.free;
117+
# };
118+
119+
# };
120+
121+
# # vertico = self.melpaBuild {
122+
# # pname = "vertico";
123+
124+
# # # inherit (haskellPackages.ghc-mod) version src;
125+
# # version = "2ad46196653b8a873adf11aee949d621af8ff6bc";
126+
127+
# # src = pkgs.fetchFromGitHub {
128+
# # owner = "minad";
129+
# # repo = "vertico";
130+
# # rev = "2ad46196653b8a873adf11aee949d621af8ff6bc";
131+
# # sha256 = "sha256-8vsNZKSWY6AcLs/a8/b9tjmkF2LEeRSAOvsdiWq+cAc=";
132+
# # };
133+
134+
# # packageRequires = [ super.compat super.emacs ];
135+
136+
# # # propagatedUserEnvPkgs = [ haskellPackages.ghc-mod ];
137+
138+
# # recipe = pkgs.writeText "recipe" ''
139+
# # (vertico :repo "minad/vertico" :fetcher github :files ("*.el" "extensions/*.el"))
140+
# # '';
141+
142+
# # fileSpecs = [ "*.el" "extensions/*.el" ];
143+
144+
# # meta = {
145+
# # homepage = "https://elpa.gnu.org/packages/vertico.html";
146+
# # license = lib.licenses.free;
147+
# # };
148+
# # };
149+
# }
150+
# ;
91151
};
92152

93153
# workaround; see https://github.com/nix-community/home-manager/issues/3342#issuecomment-1283158398
@@ -165,6 +225,7 @@
165225
};
166226
homeConfigurations."ci-ubuntu".runner = linux-home-config{
167227
user = "runner"; home = "/home/runner";
228+
168229
};
169230
};
170231
}

run-debugging-process.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env sh
2+
3+
set -xu
4+
5+
LOG_DIR="build-log-$(date | sed 's/ /-/g')"
6+
mkdir -p $LOG_DIR
7+
BUILD_LOG="$LOG_DIR/flake-build.log"
8+
REQUISITES_LOG="$LOG_DIR/requisites.log"
9+
STRAIGHT_LOG="$LOG_DIR/straight-emacs-env.log"
10+
11+
nix build --debug -L -v --no-link ~/workstation/#homeConfigurations.${WORKSTATION_NAME}.$(whoami).activationPackage --show-trace 2>&1 | tee "$BUILD_LOG"
12+
"$(nix path-info ~/workstation/#homeConfigurations.${WORKSTATION_NAME}.$(whoami).activationPackage)"/activate --show-trace 2>&1 | tee "$BUILD_LOG"
13+
14+
DERIVATION_PATH=$(nix path-info ~/workstation/#homeConfigurations.${WORKSTATION_NAME}.$(whoami).activationPackage)
15+
16+
nix-store --query --requisites --include-outputs "$DERIVATION_PATH" > "$REQUISITES_LOG"
17+
18+
STRAIGHT_ENV_PATH=$(grep straight-emacs-env "$REQUISITES_LOG" | tail -n 1)
19+
nix log "$STRAIGHT_ENV_PATH" > "$STRAIGHT_LOG"
20+
echo "============= STRAIGHT_LOG ==========="
21+
cat "$STRAIGHT_LOG"
22+
echo LOGS STORED TO "$LOG_DIR"
23+
24+
dialog.sh "workstation build finished" &

0 commit comments

Comments
 (0)