diff --git a/flake.lock b/flake.lock index 5551808..e1d4646 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1744478979, - "narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=", + "lastModified": 1748149228, + "narHash": "sha256-mmonYFesFo42UUS49Hd0bcbVJRWX/aHBCDYUkkvylf4=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "43975d782b418ebf4969e9ccba82466728c2851b", + "rev": "a9939228f661df370c4094fe85f683e45d761dbe", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1744536153, - "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", + "lastModified": 1748186667, + "narHash": "sha256-UQubDNIQ/Z42R8tPCIpY+BOhlxO8t8ZojwC9o2FW3c8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", + "rev": "bdac72d387dca7f836f6ef1fe547755fb0e9df61", "type": "github" }, "original": { @@ -36,11 +36,11 @@ }, "nixpkgs-darwin": { "locked": { - "lastModified": 1744536153, - "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", + "lastModified": 1748186667, + "narHash": "sha256-UQubDNIQ/Z42R8tPCIpY+BOhlxO8t8ZojwC9o2FW3c8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", + "rev": "bdac72d387dca7f836f6ef1fe547755fb0e9df61", "type": "github" }, "original": { diff --git a/modules/apps.nix b/modules/apps.nix index be40308..b5391ca 100644 --- a/modules/apps.nix +++ b/modules/apps.nix @@ -23,9 +23,6 @@ fastfetch gh lsd - jdk - jdk17 - jdk11 mkalias python310 tldr @@ -47,7 +44,6 @@ jetbrains.idea-ultimate ice-bar keka - postman raycast rectangle slack @@ -91,9 +87,11 @@ brews = [ "wget" "curl" # do not install curl via nixpkgs, it's not working well on macOS! - "node" + "nvm" "uv" - "pipx" + "openjdk" + "openjdk@21" + "openjdk@17" ]; # `brew install --cask` @@ -111,6 +109,16 @@ "readdle-spark" "shottr" "brave-browser" + + # Fonts + "font-fontawesome" + "font-jetbrains-mono-nerd-font" + "font-meslo-lg-nerd-font" + "font-d2coding" + "font-fira-code-nerd-font" + "font-symbols-only-nerd-font" + "font-material-design-icons-webfont" + "font-pretendard" ]; }; } diff --git a/modules/system.nix b/modules/system.nix index 108cd39..ab144d1 100644 --- a/modules/system.nix +++ b/modules/system.nix @@ -1,4 +1,4 @@ -{ pkgs, config, ... }: +{ pkgs, config, username, ... }: ################################################################################### # @@ -12,18 +12,14 @@ ################################################################################### { system = { - stateVersion = 5; + primaryUser = username; + stateVersion = 6; + # activationScripts are executed every time you boot the system or run `nixos-rebuild` / `darwin-rebuild`. - activationScripts.postUserActivation.text = '' + activationScripts.extraActivation.text = '' # activateSettings -u will reload the settings from the database and apply them to the current session, # so we do not need to logout and login again to make the changes take effect. - /System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u - ''; - - activationScripts.extraActivation.text = '' - ln -sf "${pkgs.jdk11}/zulu-11.jdk" "/Library/Java/JavaVirtualMachines/" - ln -sf "${pkgs.jdk17}/zulu-17.jdk" "/Library/Java/JavaVirtualMachines/" - ln -sf "${pkgs.jdk}/zulu-21.jdk" "/Library/Java/JavaVirtualMachines/" + sudo -u ${username} /System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u ''; activationScripts.applications.text = let @@ -231,7 +227,7 @@ filecount="find . -type f | wc -l"; cat = "bat --color=always"; man = "tldr"; - nixrebuild = "darwin-rebuild switch --flake ~/.config/nix-darwin"; + nixrebuild = "sudo darwin-rebuild switch --flake ~/.config/nix-darwin"; nixupgrade = "cd ~/.config/nix-darwin && nix flake update"; nixconfig = "code ~/.config/nix-darwin"; sshconfig = "code ~/.ssh/config"; @@ -251,20 +247,4 @@ # Set your time zone. time.timeZone = "Asia/Seoul"; - - # Fonts - fonts = { - packages = with pkgs; [ - # icon fonts - material-design-icons - font-awesome - - # nerdfonts - nerd-fonts.symbols-only - nerd-fonts.meslo-lg - nerd-fonts.d2coding - nerd-fonts.fira-code - nerd-fonts.jetbrains-mono - ]; - }; }