Skip to content

Commit c4888c2

Browse files
committed
feat: huge darwin overhaul
1 parent 7935aa6 commit c4888c2

File tree

16 files changed

+367
-230
lines changed

16 files changed

+367
-230
lines changed

.gitignore

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,17 @@
55
!docs/
66

77
!hosts/
8-
9-
!hosts/best/
10-
!hosts/best/cache/
11-
!hosts/best/garage/
12-
!hosts/best/grafana/
13-
!hosts/best/hercules/
14-
!hosts/best/matrix/
15-
!hosts/best/nextcloud/
16-
!hosts/best/nextcloud/*.gif
17-
18-
!hosts/disk/
19-
20-
!hosts/nine/
21-
!hosts/nine/github2forgejo/
22-
23-
!hosts/pala/
8+
!hosts/**/
249

2510
!lib/
2611

2712
!modules/
28-
29-
!modules/common/
30-
!modules/common/nushell/
31-
!modules/common/ssh/
32-
33-
!modules/darwin/
34-
!modules/darwin/hammerspoon/
35-
36-
!modules/linux/
37-
!modules/linux/hyprland/
38-
!modules/linux/restic/
39-
40-
!modules/acme/
41-
!modules/mail/
13+
!modules/**/
4214

4315
!flake.lock
4416

4517
!*.age
46-
!*.lua
18+
!*.gif
4719
!*.md
4820
!*.nix
4921
!*.nu

lib/colors.nix

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
_: self: _: {
2+
luminance = hex: let
3+
r = self.substring 0 2 hex |> self.fromHexString;
4+
g = self.substring 2 4 hex |> self.fromHexString;
5+
b = self.substring 4 6 hex |> self.fromHexString;
6+
in assert !self.hasPrefix "#" hex;
7+
0.2126 * r +
8+
0.7152 * g +
9+
0.0722 * b ;
10+
11+
isDark = { base00, base07, ... }: self.luminance base00 < self.luminance base07;
12+
isLight = theme: !self.isDark theme;
13+
}

lib/default.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
inputs: self: super: let
2+
colors = import ./colors.nix inputs self super;
23
filesystem = import ./filesystem.nix inputs self super;
34
option = import ./option.nix inputs self super;
45
system = import ./system.nix inputs self super;
56
values = import ./values.nix inputs self super;
6-
in filesystem // option // system // values
7+
in colors // filesystem // option // system // values

modules/common/nix.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ in {
4343

4444
nix.settings = (import <| self + /flake.nix).nixConfig
4545
|> flip removeAttrs (optionals config.isDarwin [ "use-cgroups" ])
46-
|> (if config.services.nix-serve.enable then
46+
|> (if config.isLinux && config.services.nix-serve.enable then
4747
(cfg: cfg // {
4848
extra-substituters = cfg.extra-substituters
4949
|> filter (x: match ".*cache.rgbcu.be.*" x != null);

modules/darwin/dock.nix

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
system.defaults.dock = {
3+
autohide = true;
4+
5+
mouse-over-hilite-stack = true;
6+
7+
show-recents = false;
8+
mru-spaces = false;
9+
10+
tilesize = 48;
11+
12+
enable-spring-load-actions-on-all-items = true;
13+
14+
expose-animation-duration = 0.1;
15+
16+
persistent-apps = [
17+
{ app = "/Applications/Zen.app"; }
18+
{ app = "/Applications/Ghostty.app"; }
19+
];
20+
};
21+
}

modules/darwin/finder.nix

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
system.defaults.NSGlobalDomain = {
3+
AppleShowAllFiles = true;
4+
AppleShowAllExtensions = true;
5+
6+
"com.apple.springing.enabled" = true;
7+
"com.apple.springing.delay" = 0.0;
8+
};
9+
10+
system.defaults.CustomSystemPreferences."com.apple.desktopservices" = {
11+
DSDontWriteNetworkStores = true;
12+
DSDontWriteUSBStores = true;
13+
};
14+
15+
system.defaults.finder = {
16+
AppleShowAllExtensions = true;
17+
AppleShowAllFiles = true;
18+
19+
FXEnableExtensionChangeWarning = true;
20+
FXPreferredViewStyle = "Nlsv"; # List style.
21+
FXRemoveOldTrashItems = true;
22+
23+
_FXShowPosixPathInTitle = true;
24+
_FXSortFoldersFirst = true;
25+
_FXSortFoldersFirstOnDesktop = false;
26+
27+
NewWindowTarget = "Home";
28+
29+
ShowExternalHardDrivesOnDesktop = true;
30+
ShowMountedServersOnDesktop = true;
31+
ShowPathbar = true;
32+
ShowRemovableMediaOnDesktop = true;
33+
ShowStatusBar = true;
34+
};
35+
}

modules/darwin/hammerspoon.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
home-manager.sharedModules = [{
3+
home.file.".hammerspoon/init.lua".text = "";
4+
}];
5+
}

modules/darwin/hammerspoon/default.nix

Lines changed: 0 additions & 26 deletions
This file was deleted.

modules/darwin/hammerspoon/init.lua

Lines changed: 0 additions & 171 deletions
This file was deleted.

modules/darwin/hostname.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{ config, ... }: {
2+
system.defaults.smb = {
3+
NetBIOSName = config.networking.hostName;
4+
ServerDescription = config.networking.hostName;
5+
};
6+
}

0 commit comments

Comments
 (0)