Skip to content

Commit d6d30dc

Browse files
committed
fix: adapt to nix-darwin and nixpkgs API changes
- Remove `services.nix-daemon.enable` (`nix-darwin` now manages `nix-daemon` unconditionally) - Rename `security.pam.enableSudoTouchIdAuth` to `security.pam.services.sudo_local.touchIdAuth` - Replace `system.activationScripts.preUserActivation` and `postUserActivation` with `extraActivation` - Rename `homebrew.brewPrefix` to `homebrew.prefix` and remove deprecated `lockfiles` option - Add `system.primaryUser` to `limonka` config - Remove duplicate `security.pam` and `services.nix-daemon` settings from `limonka` - Replace `sbarlua.passthru.luaPackages` with `sbarlua.passthru.luaModule.pkgs` and `sbarlua.moduleDir` with `lib/lua/` path - Rename removed/moved nixpkgs packages: - `fennel` -> `luaPackages.fennel` - `graalvm-ce` -> `graalvmPackages.graalvm-ce` - `mpv-cheatsheet` -> `mpv-cheatsheet-ng` - `pkgs.custom.swww` -> `pkgs.swww` (now in nixpkgs) - Set `services.transmission.package` to `pkgs.transmission_4` explicitly - Use `pkgs.custom.*` for custom packages that need quoted attribute names (`vim-fmi-cli`, `fennel-language-server`)
1 parent 77976be commit d6d30dc

File tree

9 files changed

+20
-23
lines changed

9 files changed

+20
-23
lines changed

hosts/nix-darwin/limonka/configuration.nix

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010

1111
# environment.darwinConfig = builtins.toString ./configuration.nix;
1212

13-
# Auto upgrade nix package and the daemon service.
14-
services.nix-daemon.enable = true;
15-
1613
nix = {
1714
# Ensure we can work with flakes
1815
# TODO: add to `README.md`
@@ -65,6 +62,9 @@
6562
nerd-fonts.fira-code
6663
];
6764

65+
# Required for nix-darwin options that apply to a specific user
66+
system.primaryUser = "pavelatanasov";
67+
6868
reo101 = {
6969
system = {
7070
enable = true;
@@ -81,9 +81,6 @@
8181
system.keyboard.enableKeyMapping = true;
8282
system.keyboard.remapCapsLockToEscape = true;
8383

84-
# Add ability to used TouchID for sudo authentication
85-
security.pam.services.sudo_local.touchIdAuth = true;
86-
8784
# Used for backwards compatibility, please read the changelog before changing.
8885
# > darwin-rebuild changelog
8986
system.stateVersion = 4;

hosts/nix-darwin/limonka/home/pavelatanasov.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
# }))
4242
(pkgs.writeShellScriptBin "lua" "exec -a $0 ${luajitPackages.nlua}/bin/nlua $@")
4343
# luajitPackages.nlua
44-
fennel
44+
luaPackages.fennel
4545
# fennel-language-server
4646
fennel-ls
4747
git
@@ -73,7 +73,7 @@
7373
himalaya
7474

7575
# Java
76-
graalvm-ce
76+
graalvmPackages.graalvm-ce
7777

7878
# SSH and GPG
7979
openssh
@@ -87,7 +87,7 @@
8787
google-cloud-sdk
8888

8989
# FMI
90-
vim-fmi-cli
90+
pkgs.custom.vim-fmi-cli
9191

9292
# Zig
9393
zigpkgs.master

hosts/nixos/gomi/homeModules/mpv.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
mpris
1818
thumbfast
1919
sponsorblock
20-
mpv-cheatsheet
20+
mpv-cheatsheet-ng
2121
mpv-discord
2222
# NOTE: Anki cards
2323
mpvacious

hosts/nixos/gomi/homeModules/niri.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
services.swww = {
1414
enable = true;
15-
package = pkgs.custom.swww;
15+
package = pkgs.swww;
1616
};
1717

1818
programs.niri = {

hosts/nixos/homix/configuration.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@
219219
### Transmission
220220
services.transmission = {
221221
enable = true;
222+
package = pkgs.transmission_4;
222223
};
223224

224225
# Open ports in the firewall.

hosts/nixos/homix/home/reo101.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
## Core
3434
neovim
35-
fennel-language-server
35+
pkgs.custom.fennel-language-server
3636
git
3737
gnupg
3838
firefox
@@ -69,7 +69,7 @@
6969
pkg-config
7070

7171
## Vim FMI
72-
vim-fmi-cli
72+
pkgs.custom.vim-fmi-cli
7373

7474
## Zig
7575
# zigpkgs."0.10.1"

modules/nix-darwin/brew/default.nix

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ in
1616

1717
config = mkIf cfg.enable {
1818
# Requires Homebrew to be installed
19-
system.activationScripts.preUserActivation.text = ''
19+
system.activationScripts.extraActivation.text = ''
2020
if ! xcode-select --version 2>/dev/null; then
2121
$DRY_RUN_CMD xcode-select --install
2222
fi
23-
if ! ${config.homebrew.brewPrefix}/brew --version 2>/dev/null; then
23+
if ! ${config.homebrew.prefix}/bin/brew --version 2>/dev/null; then
2424
$DRY_RUN_CMD /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
2525
fi
2626
'';
@@ -34,7 +34,6 @@ in
3434
};
3535
global = {
3636
brewfile = true; # Run brew bundle from anywhere
37-
lockfiles = false; # Don't save lockfile (since running from anywhere)
3837
};
3938
taps = [
4039
"homebrew/cask-fonts"

modules/nix-darwin/system/default.nix

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ in
1717

1818
config = mkIf cfg.enable {
1919

20-
services.nix-daemon.enable = true;
2120
# programs.nix-index.enable = true;
2221

2322
environment.systemPackages = [
@@ -29,7 +28,7 @@ in
2928
pkgs.nushell
3029
];
3130

32-
security.pam.enableSudoTouchIdAuth = true;
31+
security.pam.services.sudo_local.touchIdAuth = true;
3332

3433
system = {
3534
startup = {
@@ -199,8 +198,8 @@ in
199198
${inputs.mac-app-util.packages.${pkgs.stdenv.system}.default}/bin/mac-app-util sync-trampolines "/Applications/Nix Apps" "/Applications/Nix Trampolines"
200199
'';
201200

202-
# User-level settings
203-
activationScripts.postUserActivation.text = ''
201+
# User-level settings (merged into postActivation since all activation now runs as root)
202+
activationScripts.extraActivation.text = ''
204203
echo "Show the ~/Library folder"
205204
chflags nohidden ~/Library
206205

modules/nix-darwin/yabai/sketchybar/fennel.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
, ...
88
}:
99
let
10-
lua = sbarlua.passthru.luaPackages.lua;
11-
fennel = sbarlua.passthru.luaPackages.fennel;
10+
luaPkgs = sbarlua.passthru.luaModule.pkgs;
11+
lua = luaPkgs.lua;
12+
fennel = luaPkgs.fennel;
1213
in
1314
writeShellScriptBin "sketchybar-config" ''
1415
${lib.getExe' fennel "fennel"} \
15-
--add-package-cpath "${sbarlua}/${sbarlua.moduleDir}/?.so" \
16+
--add-package-cpath "${sbarlua}/lib/lua/${sbarlua.luaModule.luaversion}/?.so" \
1617
--add-fennel-path "${./config}/?.fnl" \
1718
--add-fennel-path "${./config}/?/init.fnl" \
1819
${./config}/init.fnl

0 commit comments

Comments
 (0)