Skip to content

Commit 9fbe7f4

Browse files
committed
Fix linting errors
1 parent 2998f1c commit 9fbe7f4

File tree

1 file changed

+29
-24
lines changed

1 file changed

+29
-24
lines changed

hosts/darwin/default.nix

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let user = "dustin"; in
77
../../modules/darwin/secrets.nix
88
../../modules/darwin/home-manager.nix
99
../../modules/shared
10-
agenix.darwinModules.default
10+
agenix.darwinModules.default
1111
];
1212

1313
# Auto upgrade nix package and the daemon service.
@@ -46,30 +46,35 @@ let user = "dustin"; in
4646
agenix.packages."${pkgs.system}".default
4747
] ++ (import ../../modules/shared/packages.nix { inherit pkgs; });
4848

49-
launchd.user.agents.emacs.path = [ config.environment.systemPath ];
50-
launchd.user.agents.emacs.serviceConfig = {
51-
KeepAlive = true;
52-
ProgramArguments = [
53-
"/bin/sh"
54-
"-c"
55-
"{ osascript -e 'display notification \"Attempting to start Emacs...\" with title \"Emacs Launch\"'; /bin/wait4path ${pkgs.emacs}/bin/emacs && { ${pkgs.emacs}/bin/emacs --fg-daemon; if [ $? -eq 0 ]; then osascript -e 'display notification \"Emacs has started.\" with title \"Emacs Launch\"'; else osascript -e 'display notification \"Failed to start Emacs.\" with title \"Emacs Launch\"' >&2; fi; } } &> /tmp/emacs_launch.log"
56-
];
57-
StandardErrorPath = "/tmp/emacs.err.log";
58-
StandardOutPath = "/tmp/emacs.out.log";
59-
};
49+
launchd.user.agents = {
50+
emacs = {
51+
path = [ config.environment.systemPath ];
52+
serviceConfig = {
53+
KeepAlive = true;
54+
ProgramArguments = [
55+
"/bin/sh"
56+
"-c"
57+
"{ osascript -e 'display notification \"Attempting to start Emacs...\" with title \"Emacs Launch\"'; /bin/wait4path ${pkgs.emacs}/bin/emacs && { ${pkgs.emacs}/bin/emacs --fg-daemon; if [ $? -eq 0 ]; then osascript -e 'display notification \"Emacs has started.\" with title \"Emacs Launch\"'; else osascript -e 'display notification \"Failed to start Emacs.\" with title \"Emacs Launch\"' >&2; fi; } } &> /tmp/emacs_launch.log"
58+
];
59+
StandardErrorPath = "/tmp/emacs.err.log";
60+
StandardOutPath = "/tmp/emacs.out.log";
61+
};
62+
};
6063

61-
# New launchd service to toggle natural scrolling
62-
launchd.user.agents.naturalScrollingToggle.path = [ config.environment.systemPath ];
63-
launchd.user.agents.naturalScrollingToggle.serviceConfig = {
64-
KeepAlive = false;
65-
RunAtLoad = true;
66-
ProgramArguments = [
67-
"/bin/sh"
68-
"-c"
69-
"if system_profiler SPUSBDataType | grep -i \"Mouse\"; then defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false; else defaults write NSGlobalDomain com.apple.swipescrolldirection -bool true; fi && killall Finder"
70-
];
71-
StandardErrorPath = "/tmp/natural_scrolling.err.log";
72-
StandardOutPath = "/tmp/natural_scrolling.out.log";
64+
naturalScrollingToggle = {
65+
path = [ config.environment.systemPath ];
66+
serviceConfig = {
67+
KeepAlive = false;
68+
RunAtLoad = true;
69+
ProgramArguments = [
70+
"/bin/sh"
71+
"-c"
72+
"if system_profiler SPUSBDataType | grep -i \"Mouse\"; then defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false; else defaults write NSGlobalDomain com.apple.swipescrolldirection -bool true; fi && killall Finder"
73+
];
74+
StandardErrorPath = "/tmp/natural_scrolling.err.log";
75+
StandardOutPath = "/tmp/natural_scrolling.out.log";
76+
};
77+
};
7378
};
7479

7580
system = {

0 commit comments

Comments
 (0)