From ebb2a87ca7588f9a693f4903e19b03b307f45bb2 Mon Sep 17 00:00:00 2001 From: whoami Date: Sat, 11 Oct 2025 18:45:35 +0100 Subject: [PATCH] nix-darwin --- nixcfgs/hosts/zen/default.nix | 10 ++++ .../hosts/zen/packages.nix | 0 nixcfgs/modules/darwin/default.nix | 5 ++ .../modules/darwin/js0ny}/brew.nix | 5 +- nixcfgs/modules/darwin/js0ny/dock.nix | 47 +++++++++++++++++ .../modules/darwin/js0ny}/system.nix | 52 ++----------------- 6 files changed, 67 insertions(+), 52 deletions(-) create mode 100644 nixcfgs/hosts/zen/default.nix rename home/dot_config/nix-config/hosts/macbook/default.nix => nixcfgs/hosts/zen/packages.nix (100%) create mode 100644 nixcfgs/modules/darwin/default.nix rename {home/dot_config/nix-config/hosts/macbook => nixcfgs/modules/darwin/js0ny}/brew.nix (93%) create mode 100644 nixcfgs/modules/darwin/js0ny/dock.nix rename {home/dot_config/nix-config/hosts/macbook => nixcfgs/modules/darwin/js0ny}/system.nix (57%) diff --git a/nixcfgs/hosts/zen/default.nix b/nixcfgs/hosts/zen/default.nix new file mode 100644 index 0000000..506b2e8 --- /dev/null +++ b/nixcfgs/hosts/zen/default.nix @@ -0,0 +1,10 @@ +{pkgs, ...}: +{ + imports = [ + ./packages.nix + ../../modules/darwin/js0ny/brew.nix + ../../modules/darwin/js0ny/dock.nix + ../../modules/darwin/js0ny/system.nix + ]; + time.timeZone = "Europe/London"; +} diff --git a/home/dot_config/nix-config/hosts/macbook/default.nix b/nixcfgs/hosts/zen/packages.nix similarity index 100% rename from home/dot_config/nix-config/hosts/macbook/default.nix rename to nixcfgs/hosts/zen/packages.nix diff --git a/nixcfgs/modules/darwin/default.nix b/nixcfgs/modules/darwin/default.nix new file mode 100644 index 0000000..a8c2b51 --- /dev/null +++ b/nixcfgs/modules/darwin/default.nix @@ -0,0 +1,5 @@ +{ config, pkgs, ... }: + +{ + time.timeZone = "Europe/London"; +} diff --git a/home/dot_config/nix-config/hosts/macbook/brew.nix b/nixcfgs/modules/darwin/js0ny/brew.nix similarity index 93% rename from home/dot_config/nix-config/hosts/macbook/brew.nix rename to nixcfgs/modules/darwin/js0ny/brew.nix index 2c7063c..1e9dd7b 100644 --- a/home/dot_config/nix-config/hosts/macbook/brew.nix +++ b/nixcfgs/modules/darwin/js0ny/brew.nix @@ -25,7 +25,6 @@ "neovide" "clash-verge-rev" "obsidian" - "mullvad-vpn" "alacritty" "alt-tab" "apparency" @@ -40,7 +39,7 @@ "ltspice" "orbstack" "qlcolorcode" - # "qlimagesize" discontinued. + # "qlimagesize" discontinued. "qlmarkdown" "qlstephen" "qlvideo" @@ -60,7 +59,7 @@ "TickTick" "cherry-studio" "firefox" - "Wireshark" + "wireshark-app" "LibreWolf" "brave-browser" "font-maple-mono-nf-cn" diff --git a/nixcfgs/modules/darwin/js0ny/dock.nix b/nixcfgs/modules/darwin/js0ny/dock.nix new file mode 100644 index 0000000..e5f70ea --- /dev/null +++ b/nixcfgs/modules/darwin/js0ny/dock.nix @@ -0,0 +1,47 @@ +{ config, pkgs, ... }: +{ + system.defaults.dock = { + appswitcher-all-displays = true; + autohide = true; + # Launch Animation + launchanim = false; + # Minimize Animation + mineffect = "suck"; + minimize-to-application = true; + persistent-apps = [ + { app = "/Applications/Vivaldi.app"; } + { app = "/Applications/kitty.app"; } + { app = "/Applications/Obsidian.app"; } + { app = "Applications/Visual Studio Code.app"; } + # { app = "/Applications/LibreWolf.app"; } + # { spacer = { small = false; }; } + # { spacer = { small = true; }; } + # { folder = "/System/Applications/Utilities"; } + # { folder = "/Users/js0ny/Downloads/"; } + ]; + persistent-others = [ + "/Users/js0ny/Downloads" + # "/Users/js0ny/Source" + ]; + show-recents = false; + orientation = "bottom"; + # tr - Top Right + # tl - Top Left (disable this) + # br - Bottom Right + # bl - Bottom Left + # `1`: Disabled + # `2`: Mission Control + # `3`: Application Windows + # `4`: Desktop + # `5`: Start Screen Saver + # `6`: Disable Screen Saver + # `7`: Dashboard + # `10`: Put Display to Sleep + # `11`: Launchpad + # `12`: Notification Center + # `13`: Lock Screen + # `14`: Quick Note + wvous-tr-corner = 2; + wvous-bl-corner = 11; # Simulate Windows button on Windows + wvous-br-corner = 4; + };} diff --git a/home/dot_config/nix-config/hosts/macbook/system.nix b/nixcfgs/modules/darwin/js0ny/system.nix similarity index 57% rename from home/dot_config/nix-config/hosts/macbook/system.nix rename to nixcfgs/modules/darwin/js0ny/system.nix index d489269..0e71b57 100644 --- a/home/dot_config/nix-config/hosts/macbook/system.nix +++ b/nixcfgs/modules/darwin/js0ny/system.nix @@ -1,53 +1,6 @@ { config, pkgs, ... }: - -{ - time.timeZone = "Asia/Shanghai"; + { system.defaults = { - dock = { - appswitcher-all-displays = true; - autohide = true; - # Launch Animation - launchanim = false; - # Minimize Animation - mineffect = "suck"; - minimize-to-application = true; - persistent-apps = [ - { app = "/Applications/Vivaldi.app"; } - { app = "/Applications/kitty.app"; } - { app = "/Applications/Obsidian.app"; } - { app = "Applications/Visual Studio Code.app"; } - { app = "/Applications/LibreWolf.app"; } - # { spacer = { small = false; }; } - # { spacer = { small = true; }; } - # { folder = "/System/Applications/Utilities"; } - # { folder = "/Users/js0ny/Downloads/"; } - ]; - persistent-others = [ - "/Users/js0ny/Downloads" - "/Users/js0ny/Source" - ]; - show-recents = false; - orientation = "bottom"; - # tr - Top Right - # tl - Top Left (disable this) - # br - Bottom Right - # bl - Bottom Left - # `1`: Disabled - # `2`: Mission Control - # `3`: Application Windows - # `4`: Desktop - # `5`: Start Screen Saver - # `6`: Disable Screen Saver - # `7`: Dashboard - # `10`: Put Display to Sleep - # `11`: Launchpad - # `12`: Notification Center - # `13`: Lock Screen - # `14`: Quick Note - wvous-tr-corner = 2; - wvous-bl-corner = 11; # Simulate Windows button on Windows - wvous-br-corner = 4; - }; finder = { AppleShowAllFiles = true; ShowStatusBar = true; @@ -111,4 +64,5 @@ ShowSeconds = true; }; }; -} \ No newline at end of file + + }