HASH db88eb898e42
DATE 2025-04-18
SUBJECT darwin: refactor
FILES 18 CHANGED
HASH db88eb898e42
DATE 2025-04-18
SUBJECT darwin: refactor
FILES 18 CHANGED
┌─ README.md ────────────────────────────────────────────────────────────────┐
│ diff --git a/README.md b/README.md │
│ index 4040415..2d551aa 100644 │
│ --- a/README.md │
│ +++ b/README.md │
│ @@ -29,15 +29,16 @@ The goals of this repository are: │
│ │
│ Below are all the hosts I currently maintain within this flake: │
│ │
│ -| host | spec | role | description │
│ | architecture | status | │
│ -| --------- | ------------------------------------- | ----------- | ------------- │
│ -------------------- | ------------ | ------ | │
│ -| ooksdesk | 7500F / RX5700XT / 32 GB DDR5 | Workstation | Primary deskt │
│ op workstation | x86_64 | UP | │
│ -| ookst480s | T480s / i5-8350U / 24 GB DDR4 | Workstation | Primary mobil │
│ e workstation | x86_64 | UP | │
│ -| ooksmicro | GPD Micro PC / N8100 / 8 GB LPDR3 | Workstation | Pocket workst │
│ ation | x86_64 | UP | │
│ -| ooksmedia | i3-10100 / 1650 Super / 64 GB DDR4 | Server | Homelab/Media │
│ server | x86_64 | UP | │
│ -| ooksx1 | X1 Carbon G4 / i5 6200U / 8 GB LPDDR3 | Workstation | Guest laptop │
│ | x86_64 | UP | │
│ -| ooknode | Linode Nanode | Server | VPS for websi │
│ te | x86_64 | UP | │
│ -| ooksphone | Termux | Workstation | Nix environme │
│ nt for android phone | aarch64 | DOWN | │
│ +| host | spec | role | description │
│ | architecture | status | │
│ +| --------- | ------------------------------------- | ----------- | ------------- │
│ -------------------- | -------------- | ------ | │
│ +| ooksdesk | 7500F / RX5700XT / 32 GB DDR5 | Workstation | Primary deskt │
│ op workstation | x86_64 | UP | │
│ +| ookst480s | T480s / i5-8350U / 24 GB DDR4 | Workstation | Primary mobil │
│ e workstation | x86_64 | UP | │
│ +| ooksmicro | GPD Micro PC / N8100 / 8 GB LPDR3 | Workstation | Pocket workst │
│ ation | x86_64 | UP | │
│ +| ooksmedia | i3-10100 / 1650 Super / 64 GB DDR4 | Server | Homelab/Media │
│ server | x86_64 | UP | │
│ +| ooksx1 | X1 Carbon G4 / i5 6200U / 8 GB LPDDR3 | Workstation | Guest laptop │
│ | x86_64 | UP | │
│ +| ooknode | Linode Nanode | Server | VPS for websi │
│ te | x86_64 | UP | │
│ +| ooksphone | Termux | Workstation | Nix environme │
│ nt for android phone | aarch64 | DOWN | │
│ +| ooksair | M4 MBA | Workstation | Primary mobil │
│ e workstation | aarch64-darwin | UP | │
│ │
│ ## Architecture │
│ │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ README.md ──────────────────────────┐
│ diff --git a/README.md b/README.md │
│ index 4040415..2d551aa 100644 │
│ --- a/README.md │
│ +++ b/README.md │
│ @@ -29,15 +29,16 @@ The goals of this reposi │
│ tory are: │
│ │
│ Below are all the hosts I currently maintai │
│ n within this flake: │
│ │
│ -| host | spec │
│ | role | description │
│ | architecture | status | │
│ -| --------- | ----------------------------- │
│ -------- | ----------- | ------------------- │
│ -------------- | ------------ | ------ | │
│ -| ooksdesk | 7500F / RX5700XT / 32 GB DDR5 │
│ | Workstation | Primary desktop wor │
│ kstation | x86_64 | UP | │
│ -| ookst480s | T480s / i5-8350U / 24 GB DDR4 │
│ | Workstation | Primary mobile work │
│ station | x86_64 | UP | │
│ -| ooksmicro | GPD Micro PC / N8100 / 8 GB L │
│ PDR3 | Workstation | Pocket workstation │
│ | x86_64 | UP | │
│ -| ooksmedia | i3-10100 / 1650 Super / 64 GB │
│ DDR4 | Server | Homelab/Media serve │
│ r | x86_64 | UP | │
│ -| ooksx1 | X1 Carbon G4 / i5 6200U / 8 G │
│ B LPDDR3 | Workstation | Guest laptop │
│ | x86_64 | UP | │
│ -| ooknode | Linode Nanode │
│ | Server | VPS for website │
│ | x86_64 | UP | │
│ -| ooksphone | Termux │
│ | Workstation | Nix environment for │
│ android phone | aarch64 | DOWN | │
│ +| host | spec │
│ | role | description │
│ | architecture | status | │
│ +| --------- | ----------------------------- │
│ -------- | ----------- | ------------------- │
│ -------------- | -------------- | ------ | │
│ +| ooksdesk | 7500F / RX5700XT / 32 GB DDR5 │
│ | Workstation | Primary desktop wor │
│ kstation | x86_64 | UP | │
│ +| ookst480s | T480s / i5-8350U / 24 GB DDR4 │
│ | Workstation | Primary mobile work │
│ station | x86_64 | UP | │
│ +| ooksmicro | GPD Micro PC / N8100 / 8 GB L │
│ PDR3 | Workstation | Pocket workstation │
│ | x86_64 | UP | │
│ +| ooksmedia | i3-10100 / 1650 Super / 64 GB │
│ DDR4 | Server | Homelab/Media serve │
│ r | x86_64 | UP | │
│ +| ooksx1 | X1 Carbon G4 / i5 6200U / 8 G │
│ B LPDDR3 | Workstation | Guest laptop │
│ | x86_64 | UP | │
│ +| ooknode | Linode Nanode │
│ | Server | VPS for website │
│ | x86_64 | UP | │
│ +| ooksphone | Termux │
│ | Workstation | Nix environment for │
│ android phone | aarch64 | DOWN | │
│ +| ooksair | M4 MBA │
│ | Workstation | Primary mobile work │
│ station | aarch64-darwin | UP | │
│ │
│ ## Architecture │
│ │
└──────────────────────────────────────────────┘
┌─ hosts/ooksair/default.nix ────────────────────────────────────────────────┐
│ diff --git a/hosts/ooksair/default.nix b/hosts/ooksair/default.nix │
│ index bc3759a..88c7e96 100644 │
│ --- a/hosts/ooksair/default.nix │
│ +++ b/hosts/ooksair/default.nix │
│ @@ -10,7 +10,7 @@ │
│ workstation = { │
│ theme = "minimal"; │
│ default = { │
│ - browser = "firefox"; │
│ + browser = "zen"; │
│ terminal = "ghostty"; │
│ }; │
│ }; │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ hosts/ooksair/default.nix ──────────┐
│ diff --git a/hosts/ooksair/default.nix b/hos │
│ ts/ooksair/default.nix │
│ index bc3759a..88c7e96 100644 │
│ --- a/hosts/ooksair/default.nix │
│ +++ b/hosts/ooksair/default.nix │
│ @@ -10,7 +10,7 @@ │
│ workstation = { │
│ theme = "minimal"; │
│ default = { │
│ - browser = "firefox"; │
│ + browser = "zen"; │
│ terminal = "ghostty"; │
│ }; │
│ }; │
└──────────────────────────────────────────────┘
┌─ modules/common/appearance/default.nix ────────────────────────────────────┐
│ diff --git a/modules/common/appearance/default.nix b/modules/common/appearance/def │
│ ault.nix │
│ index 86e0060..afdf477 100644 │
│ --- a/modules/common/appearance/default.nix │
│ +++ b/modules/common/appearance/default.nix │
│ @@ -1,5 +1,6 @@ │
│ { │
│ imports = [ │
│ ./options.nix │
│ + ./themes │
│ ]; │
│ } │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ ...common/appearance/default.nix ───┐
│ diff --git a/modules/common/appearance/defau │
│ lt.nix b/modules/common/appearance/default.n │
│ ix │
│ index 86e0060..afdf477 100644 │
│ --- a/modules/common/appearance/default.nix │
│ +++ b/modules/common/appearance/default.nix │
│ @@ -1,5 +1,6 @@ │
│ { │
│ imports = [ │
│ ./options.nix │
│ + ./themes │
│ ]; │
│ } │
└──────────────────────────────────────────────┘
┌─ modules/common/appearance/themes/default.nix ─────────────────────────────┐
│ diff --git a/modules/nixos/workstation/themes/default.nix b/modules/common/appeara │
│ nce/themes/default.nix │
│ similarity index 100% │
│ rename from modules/nixos/workstation/themes/default.nix │
│ rename to modules/common/appearance/themes/default.nix │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ ...appearance/themes/default.nix ───┐
│ diff --git a/modules/nixos/workstation/theme │
│ s/default.nix b/modules/common/appearance/th │
│ emes/default.nix │
│ similarity index 100% │
│ rename from modules/nixos/workstation/themes │
│ /default.nix │
│ rename to modules/common/appearance/themes/d │
│ efault.nix │
└──────────────────────────────────────────────┘
┌─ modules/common/appearance/themes/generated-wallpaper.nix ─────────────────┐
│ diff --git a/modules/nixos/workstation/themes/generated-wallpaper.nix b/modules/co │
│ mmon/appearance/themes/generated-wallpaper.nix │
│ similarity index 100% │
│ rename from modules/nixos/workstation/themes/generated-wallpaper.nix │
│ rename to modules/common/appearance/themes/generated-wallpaper.nix │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ ...hemes/generated-wallpaper.nix ───┐
│ diff --git a/modules/nixos/workstation/theme │
│ s/generated-wallpaper.nix b/modules/common/a │
│ ppearance/themes/generated-wallpaper.nix │
│ similarity index 100% │
│ rename from modules/nixos/workstation/themes │
│ /generated-wallpaper.nix │
│ rename to modules/common/appearance/themes/g │
│ enerated-wallpaper.nix │
└──────────────────────────────────────────────┘
┌─ modules/common/appearance/themes/hozen.nix ───────────────────────────────┐
│ diff --git a/modules/nixos/workstation/themes/hozen.nix b/modules/common/appearanc │
│ e/themes/hozen.nix │
│ similarity index 94% │
│ rename from modules/nixos/workstation/themes/hozen.nix │
│ rename to modules/common/appearance/themes/hozen.nix │
│ index 083e0d8..01b5b12 100644 │
│ --- a/modules/nixos/workstation/themes/hozen.nix │
│ +++ b/modules/common/appearance/themes/hozen.nix │
│ @@ -6,6 +6,7 @@ │
│ ... │
│ }: let │
│ inherit (lib) mkIf; │
│ + inherit (pkgs.stdenv) isLinux; │
│ inherit (config.ooknet.workstation) theme; │
│ generatedWallpaper = import ./generated-wallpaper.nix {inherit hozen config pkg │
│ s;} {}; │
│ in { │
│ @@ -54,7 +55,7 @@ in { │
│ }; │
│ │
│ wallpaper = { │
│ - path = "${generatedWallpaper}"; │
│ + path = mkIf isLinux "${generatedWallpaper}"; │
│ }; │
│ }; │
│ }; │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ ...n/appearance/themes/hozen.nix ───┐
│ diff --git a/modules/nixos/workstation/theme │
│ s/hozen.nix b/modules/common/appearance/them │
│ es/hozen.nix │
│ similarity index 94% │
│ rename from modules/nixos/workstation/themes │
│ /hozen.nix │
│ rename to modules/common/appearance/themes/h │
│ ozen.nix │
│ index 083e0d8..01b5b12 100644 │
│ --- a/modules/nixos/workstation/themes/hozen │
│ .nix │
│ +++ b/modules/common/appearance/themes/hozen │
│ .nix │
│ @@ -6,6 +6,7 @@ │
│ ... │
│ }: let │
│ inherit (lib) mkIf; │
│ + inherit (pkgs.stdenv) isLinux; │
│ inherit (config.ooknet.workstation) theme │
│ ; │
│ generatedWallpaper = import ./generated-w │
│ allpaper.nix {inherit hozen config pkgs;} {} │
│ ; │
│ in { │
│ @@ -54,7 +55,7 @@ in { │
│ }; │
│ │
│ wallpaper = { │
│ - path = "${generatedWallpaper}"; │
│ + path = mkIf isLinux "${generatedWal │
│ lpaper}"; │
│ }; │
│ }; │
│ }; │
└──────────────────────────────────────────────┘
┌─ modules/common/appearance/themes/minimal.nix ─────────────────────────────┐
│ diff --git a/modules/nixos/workstation/themes/minimal.nix b/modules/common/appeara │
│ nce/themes/minimal.nix │
│ similarity index 93% │
│ rename from modules/nixos/workstation/themes/minimal.nix │
│ rename to modules/common/appearance/themes/minimal.nix │
│ index 73f3484..431fe79 100644 │
│ --- a/modules/nixos/workstation/themes/minimal.nix │
│ +++ b/modules/common/appearance/themes/minimal.nix │
│ @@ -7,6 +7,7 @@ │
│ ... │
│ }: let │
│ inherit (lib) mkIf; │
│ + inherit (pkgs.stdenv) isLinux; │
│ inherit (config.ooknet.workstation) theme; │
│ generatedWallpaper = import ./generated-wallpaper.nix {inherit hozen config pkg │
│ s;} {}; │
│ in { │
│ @@ -43,7 +44,7 @@ in { │
│ }; │
│ │
│ wallpaper = { │
│ - path = "${generatedWallpaper}"; │
│ + path = mkIf isLinux "${generatedWallpaper}"; │
│ }; │
│ }; │
│ }; │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ ...appearance/themes/minimal.nix ───┐
│ diff --git a/modules/nixos/workstation/theme │
│ s/minimal.nix b/modules/common/appearance/th │
│ emes/minimal.nix │
│ similarity index 93% │
│ rename from modules/nixos/workstation/themes │
│ /minimal.nix │
│ rename to modules/common/appearance/themes/m │
│ inimal.nix │
│ index 73f3484..431fe79 100644 │
│ --- a/modules/nixos/workstation/themes/minim │
│ al.nix │
│ +++ b/modules/common/appearance/themes/minim │
│ al.nix │
│ @@ -7,6 +7,7 @@ │
│ ... │
│ }: let │
│ inherit (lib) mkIf; │
│ + inherit (pkgs.stdenv) isLinux; │
│ inherit (config.ooknet.workstation) theme │
│ ; │
│ generatedWallpaper = import ./generated-w │
│ allpaper.nix {inherit hozen config pkgs;} {} │
│ ; │
│ in { │
│ @@ -43,7 +44,7 @@ in { │
│ }; │
│ │
│ wallpaper = { │
│ - path = "${generatedWallpaper}"; │
│ + path = mkIf isLinux "${generatedWal │
│ lpaper}"; │
│ }; │
│ }; │
│ }; │
└──────────────────────────────────────────────┘
┌─ modules/darwin/default.nix ───────────────────────────────────────────────┐
│ diff --git a/modules/darwin/default.nix b/modules/darwin/default.nix │
│ index 973aabe..ef698af 100644 │
│ --- a/modules/darwin/default.nix │
│ +++ b/modules/darwin/default.nix │
│ @@ -9,6 +9,11 @@ │
│ in { │
│ imports = [ │
│ ./system.nix │
│ + ./window-manager.nix │
│ + ./environment.nix │
│ + ./networking.nix │
│ + ./security.nix │
│ + ./homebrew.nix │
│ ]; │
│ home-manager.users = │
│ (optionalAttrs admin.homeManager { │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ modules/darwin/default.nix ─────────┐
│ diff --git a/modules/darwin/default.nix b/mo │
│ dules/darwin/default.nix │
│ index 973aabe..ef698af 100644 │
│ --- a/modules/darwin/default.nix │
│ +++ b/modules/darwin/default.nix │
│ @@ -9,6 +9,11 @@ │
│ in { │
│ imports = [ │
│ ./system.nix │
│ + ./window-manager.nix │
│ + ./environment.nix │
│ + ./networking.nix │
│ + ./security.nix │
│ + ./homebrew.nix │
│ ]; │
│ home-manager.users = │
│ (optionalAttrs admin.homeManager { │
└──────────────────────────────────────────────┘
┌─ modules/darwin/environment.nix ───────────────────────────────────────────┐
│ diff --git a/modules/darwin/environment.nix b/modules/darwin/environment.nix │
│ new file mode 100644 │
│ index 0000000..0d3750c │
│ --- /dev/null │
│ +++ b/modules/darwin/environment.nix │
│ @@ -0,0 +1,13 @@ │
│ +{ │
│ + config, │
│ + pkgs, │
│ + ... │
│ +}: let │
│ + inherit (config.ooknet.host) admin; │
│ +in { │
│ + environment = { │
│ + shells = [ │
│ + pkgs.${admin.shell} │
│ + ]; │
│ + }; │
│ +} │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ modules/darwin/environment.nix ─────┐
│ diff --git a/modules/darwin/environment.nix │
│ b/modules/darwin/environment.nix │
│ new file mode 100644 │
│ index 0000000..0d3750c │
│ --- /dev/null │
│ +++ b/modules/darwin/environment.nix │
│ @@ -0,0 +1,13 @@ │
│ +{ │
│ + config, │
│ + pkgs, │
│ + ... │
│ +}: let │
│ + inherit (config.ooknet.host) admin; │
│ +in { │
│ + environment = { │
│ + shells = [ │
│ + pkgs.${admin.shell} │
│ + ]; │
│ + }; │
│ +} │
└──────────────────────────────────────────────┘
┌─ modules/darwin/homebrew.nix ──────────────────────────────────────────────┐
│ diff --git a/modules/darwin/homebrew.nix b/modules/darwin/homebrew.nix │
│ new file mode 100644 │
│ index 0000000..fcd01e3 │
│ --- /dev/null │
│ +++ b/modules/darwin/homebrew.nix │
│ @@ -0,0 +1,25 @@ │
│ +{ │
│ + config, │
│ + lib, │
│ + ... │
│ +}: let │
│ + inherit (config.ooknet.workstation) default programs; │
│ + inherit (lib) optionals; │
│ +in { │
│ + homebrew = { │
│ + enable = true; │
│ + caskArgs = { │
│ + no_quarantine = true; │
│ + }; │
│ + onActivation = { │
│ + # uninstall package if removed from configuration │
│ + cleanup = "uninstall"; │
│ + }; │
│ + casks = │
│ + [ │
│ + ] │
│ + ++ optionals (default.terminal == "ghostty" || programs.ghostty.enable) ["g │
│ hostty"] │
│ + ++ optionals (default.browser == "firefox" || programs.firefox.enable) ["fi │
│ refox"] │
│ + ++ optionals (default.browser == "zen" || programs.zen.enable) ["zen-browse │
│ r"]; │
│ + }; │
│ +} │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ modules/darwin/homebrew.nix ────────┐
│ diff --git a/modules/darwin/homebrew.nix b/m │
│ odules/darwin/homebrew.nix │
│ new file mode 100644 │
│ index 0000000..fcd01e3 │
│ --- /dev/null │
│ +++ b/modules/darwin/homebrew.nix │
│ @@ -0,0 +1,25 @@ │
│ +{ │
│ + config, │
│ + lib, │
│ + ... │
│ +}: let │
│ + inherit (config.ooknet.workstation) defau │
│ lt programs; │
│ + inherit (lib) optionals; │
│ +in { │
│ + homebrew = { │
│ + enable = true; │
│ + caskArgs = { │
│ + no_quarantine = true; │
│ + }; │
│ + onActivation = { │
│ + # uninstall package if removed from c │
│ onfiguration │
│ + cleanup = "uninstall"; │
│ + }; │
│ + casks = │
│ + [ │
│ + ] │
│ + ++ optionals (default.terminal == "gh │
│ ostty" || programs.ghostty.enable) ["ghostty │
│ "] │
│ + ++ optionals (default.browser == "fir │
│ efox" || programs.firefox.enable) ["firefox" │
│ ] │
│ + ++ optionals (default.browser == "zen │
│ " || programs.zen.enable) ["zen-browser"]; │
│ + }; │
│ +} │
└──────────────────────────────────────────────┘
┌─ modules/darwin/networking.nix ────────────────────────────────────────────┐
│ diff --git a/modules/darwin/networking.nix b/modules/darwin/networking.nix │
│ new file mode 100644 │
│ index 0000000..4b3bc6d │
│ --- /dev/null │
│ +++ b/modules/darwin/networking.nix │
│ @@ -0,0 +1,11 @@ │
│ +{ │
│ + lib, │
│ + config, │
│ + ... │
│ +}: let │
│ + inherit (config.ooknet) host; │
│ +in { │
│ + networking = { │
│ + computerName = host.name; │
│ + }; │
│ +} │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ modules/darwin/networking.nix ──────┐
│ diff --git a/modules/darwin/networking.nix b │
│ /modules/darwin/networking.nix │
│ new file mode 100644 │
│ index 0000000..4b3bc6d │
│ --- /dev/null │
│ +++ b/modules/darwin/networking.nix │
│ @@ -0,0 +1,11 @@ │
│ +{ │
│ + lib, │
│ + config, │
│ + ... │
│ +}: let │
│ + inherit (config.ooknet) host; │
│ +in { │
│ + networking = { │
│ + computerName = host.name; │
│ + }; │
│ +} │
└──────────────────────────────────────────────┘
┌─ modules/darwin/security.nix ──────────────────────────────────────────────┐
│ diff --git a/modules/darwin/security.nix b/modules/darwin/security.nix │
│ new file mode 100644 │
│ index 0000000..cee440b │
│ --- /dev/null │
│ +++ b/modules/darwin/security.nix │
│ @@ -0,0 +1,4 @@ │
│ +{ │
│ + # use touch ID for sudo auth │
│ + security.pam.services.sudo_local.touchIdAuth = true; │
│ +} │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ modules/darwin/security.nix ────────┐
│ diff --git a/modules/darwin/security.nix b/m │
│ odules/darwin/security.nix │
│ new file mode 100644 │
│ index 0000000..cee440b │
│ --- /dev/null │
│ +++ b/modules/darwin/security.nix │
│ @@ -0,0 +1,4 @@ │
│ +{ │
│ + # use touch ID for sudo auth │
│ + security.pam.services.sudo_local.touchIdA │
│ uth = true; │
│ +} │
└──────────────────────────────────────────────┘
┌─ modules/darwin/system.nix ────────────────────────────────────────────────┐
│ diff --git a/modules/darwin/system.nix b/modules/darwin/system.nix │
│ index f34afee..aeb2053 100644 │
│ --- a/modules/darwin/system.nix │
│ +++ b/modules/darwin/system.nix │
│ @@ -4,6 +4,12 @@ │
│ enableKeyMapping = true; │
│ }; │
│ defaults = { │
│ + trackpad = { │
│ + # tap click │
│ + Clicking = true; │
│ + TrackpadRightClick = true; │
│ + TrackpadThreeFingerDrag = true; │
│ + }; │
│ finder = { │
│ # always show file extensions │
│ AppleShowAllExtensions = true; │
│ @@ -19,6 +25,24 @@ │
│ # only show opened apps │
│ static-only = true; │
│ }; │
│ + NSGlobalDomain = { │
│ + AppleInterfaceStyle = "Dark"; │
│ + AppleKeyboardUIMode = 3; │
│ + AppleShowAllFiles = true; │
│ + │
│ + NSAutomaticWindowAnimationsEnabled = false; │
│ + NSWindowResizeTime = 0.0; │
│ + NSUseAnimatedFocusRing = false; │
│ + _HIHideMenuBar = true; │
│ + }; │
│ + }; │
│ + activationScripts = { │
│ + # not sure this is still necessary at this point │
│ + # meant to avoid the need to logout/restart │
│ + # for changes to take effect │
│ + postUserActivation.text = '' │
│ + /System/Library/PrivateFrameworks/SystemAdministration.framework/Resource │
│ s/activateSettings -u │
│ + ''; │
│ }; │
│ }; │
│ } │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ modules/darwin/system.nix ──────────┐
│ diff --git a/modules/darwin/system.nix b/mod │
│ ules/darwin/system.nix │
│ index f34afee..aeb2053 100644 │
│ --- a/modules/darwin/system.nix │
│ +++ b/modules/darwin/system.nix │
│ @@ -4,6 +4,12 @@ │
│ enableKeyMapping = true; │
│ }; │
│ defaults = { │
│ + trackpad = { │
│ + # tap click │
│ + Clicking = true; │
│ + TrackpadRightClick = true; │
│ + TrackpadThreeFingerDrag = true; │
│ + }; │
│ finder = { │
│ # always show file extensions │
│ AppleShowAllExtensions = true; │
│ @@ -19,6 +25,24 @@ │
│ # only show opened apps │
│ static-only = true; │
│ }; │
│ + NSGlobalDomain = { │
│ + AppleInterfaceStyle = "Dark"; │
│ + AppleKeyboardUIMode = 3; │
│ + AppleShowAllFiles = true; │
│ + │
│ + NSAutomaticWindowAnimationsEnabled │
│ = false; │
│ + NSWindowResizeTime = 0.0; │
│ + NSUseAnimatedFocusRing = false; │
│ + _HIHideMenuBar = true; │
│ + }; │
│ + }; │
│ + activationScripts = { │
│ + # not sure this is still necessary at │
│ this point │
│ + # meant to avoid the need to logout/r │
│ estart │
│ + # for changes to take effect │
│ + postUserActivation.text = '' │
│ + /System/Library/PrivateFrameworks/S │
│ ystemAdministration.framework/Resources/acti │
│ vateSettings -u │
│ + ''; │
│ }; │
│ }; │
│ } │
└──────────────────────────────────────────────┘
┌─ modules/darwin/window-manager.nix ────────────────────────────────────────┐
│ diff --git a/modules/darwin/window-manager.nix b/modules/darwin/window-manager.nix │
│ new file mode 100644 │
│ index 0000000..c3dbf46 │
│ --- /dev/null │
│ +++ b/modules/darwin/window-manager.nix │
│ @@ -0,0 +1,98 @@ │
│ +{ │
│ + hozen, │
│ + pkgs, │
│ + config, │
│ + ... │
│ +}: let │
│ + inherit (hozen) color; │
│ + inherit (config.ooknet.appearance.fonts) monospace regular; │
│ + padding = 15; │
│ + mod = "cmd"; │
│ +in { │
│ + services = { │
│ + aerospace = { │
│ + enable = true; │
│ + settings = { │
│ + enable-normalization-flatten-containers = true; │
│ + enable-normalization-opposite-orientation-for-nested-containers = true; │
│ + accordion-padding = padding; │
│ + gaps = { │
│ + outer = { │
│ + left = padding; │
│ + right = padding; │
│ + top = padding; │
│ + bottom = padding; │
│ + }; │
│ + inner = { │
│ + horizontal = padding; │
│ + vertical = padding; │
│ + }; │
│ + }; │
│ + mode = { │
│ + main = { │
│ + binding = { │
│ + "${mod}-left" = "focus left --boundaries all-monitors-outer-frame"; │
│ + "${mod}-right" = "focus right --boundaries all-monitors-outer-frame │
│ "; │
│ + "${mod}-up" = "focus up --boundaries all-monitors-outer-frame"; │
│ + "${mod}-down" = "focus down --boundaries all-monitors-outer-frame"; │
│ + "${mod}-1" = "workspace 1"; │
│ + "${mod}-2" = "workspace 2"; │
│ + "${mod}-3" = "workspace 3"; │
│ + "${mod}-4" = "workspace 4"; │
│ + "${mod}-5" = "workspace 5"; │
│ + "${mod}-6" = "workspace 6"; │
│ + "${mod}-7" = "workspace 7"; │
│ + "${mod}-8" = "workspace 8"; │
│ + "${mod}-9" = "workspace 9"; │
│ + │
│ + "${mod}-shift-1" = "move-node-to-workspace 1"; │
│ + "${mod}-shift-2" = "move-node-to-workspace 2"; │
│ + "${mod}-shift-3" = "move-node-to-workspace 3"; │
│ + "${mod}-shift-4" = "move-node-to-workspace 4"; │
│ + "${mod}-shift-5" = "move-node-to-workspace 5"; │
│ + "${mod}-shift-6" = "move-node-to-workspace 6"; │
│ + "${mod}-shift-7" = "move-node-to-workspace 7"; │
│ + "${mod}-shift-8" = "move-node-to-workspace 8"; │
│ + "${mod}-shift-9" = "move-node-to-workspace 9"; │
│ + │
│ + "alt-enter" = "exec-and-forget osascript ${pkgs.writeText "open-gho │
│ stty.applescript" '' │
│ + tell application "Ghostty" │
│ + if it is running then │
│ + activate │
│ + tell application "System Events" to keystroke "n" using {comm │
│ and down} │
│ + else │
│ + activate │
│ + end if │
│ + end tell │
│ + ''}"; │
│ + }; │
│ + }; │
│ + }; │
│ + }; │
│ + }; │
│ + sketchybar = { │
│ + enable = true; │
│ + config = '' │
│ + bar_config=( │
│ + color="${color.layout.header}" │
│ + height=40 │
│ + margin=${toString padding} │
│ + position=top │
│ + sticky=on │
│ + corner_radius=8 │
│ + ) │
│ + ''; │
│ + }; │
│ + jankyborders = { │
│ + enable = true; │
│ + order = "above"; │
│ + active_color = "0xff${color.border.active}"; │
│ + inactive_color = "0xff${color.border.inactive}"; │
│ + width = 5.0; │
│ + }; │
│ + }; │
│ + fonts.packages = [ │
│ + monospace.package │
│ + regular.package │
│ + ]; │
│ +} │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ ...les/darwin/window-manager.nix ───┐
│ diff --git a/modules/darwin/window-manager.n │
│ ix b/modules/darwin/window-manager.nix │
│ new file mode 100644 │
│ index 0000000..c3dbf46 │
│ --- /dev/null │
│ +++ b/modules/darwin/window-manager.nix │
│ @@ -0,0 +1,98 @@ │
│ +{ │
│ + hozen, │
│ + pkgs, │
│ + config, │
│ + ... │
│ +}: let │
│ + inherit (hozen) color; │
│ + inherit (config.ooknet.appearance.fonts) │
│ monospace regular; │
│ + padding = 15; │
│ + mod = "cmd"; │
│ +in { │
│ + services = { │
│ + aerospace = { │
│ + enable = true; │
│ + settings = { │
│ + enable-normalization-flatten-contai │
│ ners = true; │
│ + enable-normalization-opposite-orien │
│ tation-for-nested-containers = true; │
│ + accordion-padding = padding; │
│ + gaps = { │
│ + outer = { │
│ + left = padding; │
│ + right = padding; │
│ + top = padding; │
│ + bottom = padding; │
│ + }; │
│ + inner = { │
│ + horizontal = padding; │
│ + vertical = padding; │
│ + }; │
│ + }; │
│ + mode = { │
│ + main = { │
│ + binding = { │
│ + "${mod}-left" = "focus left - │
│ -boundaries all-monitors-outer-frame"; │
│ + "${mod}-right" = "focus right │
│ --boundaries all-monitors-outer-frame"; │
│ + "${mod}-up" = "focus up --bou │
│ ndaries all-monitors-outer-frame"; │
│ + "${mod}-down" = "focus down - │
│ -boundaries all-monitors-outer-frame"; │
│ + "${mod}-1" = "workspace 1"; │
│ + "${mod}-2" = "workspace 2"; │
│ + "${mod}-3" = "workspace 3"; │
│ + "${mod}-4" = "workspace 4"; │
│ + "${mod}-5" = "workspace 5"; │
│ + "${mod}-6" = "workspace 6"; │
│ + "${mod}-7" = "workspace 7"; │
│ + "${mod}-8" = "workspace 8"; │
│ + "${mod}-9" = "workspace 9"; │
│ + │
│ + "${mod}-shift-1" = "move-node │
│ -to-workspace 1"; │
│ + "${mod}-shift-2" = "move-node │
│ -to-workspace 2"; │
│ + "${mod}-shift-3" = "move-node │
│ -to-workspace 3"; │
│ + "${mod}-shift-4" = "move-node │
│ -to-workspace 4"; │
│ + "${mod}-shift-5" = "move-node │
│ -to-workspace 5"; │
│ + "${mod}-shift-6" = "move-node │
│ -to-workspace 6"; │
│ + "${mod}-shift-7" = "move-node │
│ -to-workspace 7"; │
│ + "${mod}-shift-8" = "move-node │
│ -to-workspace 8"; │
│ + "${mod}-shift-9" = "move-node │
│ -to-workspace 9"; │
│ + │
│ + "alt-enter" = "exec-and-forge │
│ t osascript ${pkgs.writeText "open-ghostty.a │
│ pplescript" '' │
│ + tell application "Ghostty" │
│ + if it is running then │
│ + activate │
│ + tell application "Syste │
│ m Events" to keystroke "n" using {command do │
│ wn} │
│ + else │
│ + activate │
│ + end if │
│ + end tell │
│ + ''}"; │
│ + }; │
│ + }; │
│ + }; │
│ + }; │
│ + }; │
│ + sketchybar = { │
│ + enable = true; │
│ + config = '' │
│ + bar_config=( │
│ + color="${color.layout.header}" │
│ + height=40 │
│ + margin=${toString padding} │
│ + position=top │
│ + sticky=on │
│ + corner_radius=8 │
│ + ) │
│ + ''; │
│ + }; │
│ + jankyborders = { │
│ + enable = true; │
│ + order = "above"; │
│ + active_color = "0xff${color.border.ac │
│ tive}"; │
│ + inactive_color = "0xff${color.border. │
│ inactive}"; │
│ + width = 5.0; │
│ + }; │
│ + }; │
│ + fonts.packages = [ │
│ + monospace.package │
│ + regular.package │
│ + ]; │
│ +} │
└──────────────────────────────────────────────┘
┌─ modules/home/common/browser/firefox/default.nix ──────────────────────────┐
│ diff --git a/modules/home/common/browser/firefox/default.nix b/modules/home/common │
│ /browser/firefox/default.nix │
│ index df3ddea..1395bb7 100644 │
│ --- a/modules/home/common/browser/firefox/default.nix │
│ +++ b/modules/home/common/browser/firefox/default.nix │
│ @@ -10,6 +10,7 @@ │
│ inherit (lib) mkIf mkMerge; │
│ inherit (osConfig.ooknet.appearance) fonts; │
│ inherit (osConfig.ooknet.workstation) default; │
│ + inherit (pkgs.stdenv) isDarwin; │
│ │
│ addons = inputs'.firefox-addons.packages; │
│ cfg = osConfig.ooknet.workstation.programs.firefox; │
│ @@ -34,6 +35,10 @@ in { │
│ (mkIf (cfg.enable || default.browser == "firefox") { │
│ programs.firefox = { │
│ enable = true; │
│ + package = │
│ + if isDarwin │
│ + then null │
│ + else pkgs.firefox; │
│ nativeMessagingHosts = [pkgs.tridactyl-native]; │
│ profiles.${config.home.username} = { │
│ id = 0; │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ ...n/browser/firefox/default.nix ───┐
│ diff --git a/modules/home/common/browser/fir │
│ efox/default.nix b/modules/home/common/brows │
│ er/firefox/default.nix │
│ index df3ddea..1395bb7 100644 │
│ --- a/modules/home/common/browser/firefox/de │
│ fault.nix │
│ +++ b/modules/home/common/browser/firefox/de │
│ fault.nix │
│ @@ -10,6 +10,7 @@ │
│ inherit (lib) mkIf mkMerge; │
│ inherit (osConfig.ooknet.appearance) font │
│ s; │
│ inherit (osConfig.ooknet.workstation) def │
│ ault; │
│ + inherit (pkgs.stdenv) isDarwin; │
│ │
│ addons = inputs'.firefox-addons.packages; │
│ cfg = osConfig.ooknet.workstation.program │
│ s.firefox; │
│ @@ -34,6 +35,10 @@ in { │
│ (mkIf (cfg.enable || default.browser == │
│ "firefox") { │
│ programs.firefox = { │
│ enable = true; │
│ + package = │
│ + if isDarwin │
│ + then null │
│ + else pkgs.firefox; │
│ nativeMessagingHosts = [pkgs.tridac │
│ tyl-native]; │
│ profiles.${config.home.username} = │
│ { │
│ id = 0; │
└──────────────────────────────────────────────┘
┌─ modules/home/common/terminal/ghostty.nix ─────────────────────────────────┐
│ diff --git a/modules/home/common/terminal/ghostty.nix b/modules/home/common/termin │
│ al/ghostty.nix │
│ index eaa1557..b58e930 100644 │
│ --- a/modules/home/common/terminal/ghostty.nix │
│ +++ b/modules/home/common/terminal/ghostty.nix │
│ @@ -57,6 +57,7 @@ in { │
│ "ctrl+shift+v=paste_from_clipboard" │
│ "ctrl+shift+c=copy_to_clipboard" │
│ ]; │
│ + macos-option-as-alt = isDarwin; │
│ }; │
│ themes.hozen = { │
│ background = "${color.base00}"; │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ ...e/common/terminal/ghostty.nix ───┐
│ diff --git a/modules/home/common/terminal/gh │
│ ostty.nix b/modules/home/common/terminal/gho │
│ stty.nix │
│ index eaa1557..b58e930 100644 │
│ --- a/modules/home/common/terminal/ghostty.n │
│ ix │
│ +++ b/modules/home/common/terminal/ghostty.n │
│ ix │
│ @@ -57,6 +57,7 @@ in { │
│ "ctrl+shift+v=paste_from_clipbo │
│ ard" │
│ "ctrl+shift+c=copy_to_clipboard │
│ " │
│ ]; │
│ + macos-option-as-alt = isDarwin; │
│ }; │
│ themes.hozen = { │
│ background = "${color.base00}"; │
└──────────────────────────────────────────────┘
┌─ modules/nixos/workstation/default.nix ────────────────────────────────────┐
│ diff --git a/modules/nixos/workstation/default.nix b/modules/nixos/workstation/def │
│ ault.nix │
│ index 6623748..4c20e47 100644 │
│ --- a/modules/nixos/workstation/default.nix │
│ +++ b/modules/nixos/workstation/default.nix │
│ @@ -14,7 +14,6 @@ │
│ in { │
│ imports = [ │
│ ./options.nix │
│ - ./themes │
│ ./services │
│ ./programs │
│ ./gaming │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ ...nixos/workstation/default.nix ───┐
│ diff --git a/modules/nixos/workstation/defau │
│ lt.nix b/modules/nixos/workstation/default.n │
│ ix │
│ index 6623748..4c20e47 100644 │
│ --- a/modules/nixos/workstation/default.nix │
│ +++ b/modules/nixos/workstation/default.nix │
│ @@ -14,7 +14,6 @@ │
│ in { │
│ imports = [ │
│ ./options.nix │
│ - ./themes │
│ ./services │
│ ./programs │
│ ./gaming │
└──────────────────────────────────────────────┘
┌─ modules/nixos/workstation/options.nix ────────────────────────────────────┐
│ diff --git a/modules/nixos/workstation/options.nix b/modules/nixos/workstation/opt │
│ ions.nix │
│ index debc8e3..dffea54 100644 │
│ --- a/modules/nixos/workstation/options.nix │
│ +++ b/modules/nixos/workstation/options.nix │
│ @@ -17,7 +17,7 @@ in { │
│ }; │
│ default = { │
│ browser = mkOption { │
│ - type = nullOr (enum ["firefox" "chromium"]); │
│ + type = nullOr (enum ["firefox" "chromium" "zen"]); │
│ default = "firefox"; │
│ }; │
│ terminal = mkOption { │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ ...nixos/workstation/options.nix ───┐
│ diff --git a/modules/nixos/workstation/optio │
│ ns.nix b/modules/nixos/workstation/options.n │
│ ix │
│ index debc8e3..dffea54 100644 │
│ --- a/modules/nixos/workstation/options.nix │
│ +++ b/modules/nixos/workstation/options.nix │
│ @@ -17,7 +17,7 @@ in { │
│ }; │
│ default = { │
│ browser = mkOption { │
│ - type = nullOr (enum ["firefox" "chr │
│ omium"]); │
│ + type = nullOr (enum ["firefox" "chr │
│ omium" "zen"]); │
│ default = "firefox"; │
│ }; │
│ terminal = mkOption { │
└──────────────────────────────────────────────┘
[ BACK TO LOG ]
──────────────────────────────────────────────────────────────────────────────────────
OOKNET
────────────────────────────────────────────────
OOKNET