From 62588aba262765c388e671f39aa5d40e32921028 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Tue, 12 Sep 2023 11:47:17 -0400 Subject: [PATCH] Fixing macOS environment and fonts --- flake.lock | 44 +++++++++++++++++++------------------- flake.nix | 6 +++--- modules/darwin/default.nix | 21 +++++++++--------- 3 files changed, 35 insertions(+), 36 deletions(-) diff --git a/flake.lock b/flake.lock index ae02214..95114bf 100644 --- a/flake.lock +++ b/flake.lock @@ -17,26 +17,6 @@ "type": "github" } }, - "darwin": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1692248770, - "narHash": "sha256-tZeFpETKQGbgnaSIO1AGWD27IyTcBm4D+A9d7ulQ4NM=", - "owner": "lnl7", - "repo": "nix-darwin", - "rev": "511177ffe8226c78c9cf6a92a7b5f2df3684956b", - "type": "github" - }, - "original": { - "owner": "lnl7", - "repo": "nix-darwin", - "type": "github" - } - }, "flake-utils": { "inputs": { "systems": "systems" @@ -76,6 +56,26 @@ } }, "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1694497842, + "narHash": "sha256-z03v/m0OwcLBok97KcUgMl8ZFw5Xwsi2z+n6nL7JdXY=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "4496ab26628c5f43d2a5c577a06683c753e32fe2", + "type": "github" + }, + "original": { + "owner": "lnl7", + "repo": "nix-darwin", + "type": "github" + } + }, + "nix-darwin_2": { "inputs": { "nixpkgs": "nixpkgs" }, @@ -97,7 +97,7 @@ "inputs": { "brew-src": "brew-src", "flake-utils": "flake-utils", - "nix-darwin": "nix-darwin", + "nix-darwin": "nix-darwin_2", "nixpkgs": "nixpkgs_2" }, "locked": { @@ -160,8 +160,8 @@ }, "root": { "inputs": { - "darwin": "darwin", "home-manager": "home-manager", + "nix-darwin": "nix-darwin", "nix-homebrew": "nix-homebrew", "nixpkgs": "nixpkgs_3" } diff --git a/flake.nix b/flake.nix index 2ae8573..8052e07 100644 --- a/flake.nix +++ b/flake.nix @@ -6,7 +6,7 @@ nixpkgs.url = "github:nixos/nixpkgs"; # Controls system level software and settings including fonts - darwin = { + nix-darwin = { url = "github:lnl7/nix-darwin"; inputs.nixpkgs.follows = "nixpkgs"; }; @@ -21,7 +21,7 @@ nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew"; }; # end inputs - outputs = { self, nixpkgs, darwin, home-manager, nix-homebrew, ... }: { + outputs = { self, nixpkgs, nix-darwin, home-manager, nix-homebrew, ... }: { nixosConfigurations.rainbow-planet = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ @@ -41,7 +41,7 @@ }; # end nixosConfigurations # This is only set to work with x86 macOS right now... that will need to be updated - darwinConfigurations.Blue-Rock = darwin.lib.darwinSystem { + darwinConfigurations.Blue-Rock = nix-darwin.lib.darwinSystem { system = "x86_64-darwin"; pkgs = import nixpkgs { system = "x86_64-darwin"; }; modules = [ diff --git a/modules/darwin/default.nix b/modules/darwin/default.nix index 0f9427d..00a04b0 100644 --- a/modules/darwin/default.nix +++ b/modules/darwin/default.nix @@ -37,12 +37,6 @@ ]; }; - fonts.fontDir.enable = false; # True will uninstall other fonts, false installs, but doesn't uninstall - fonts.fonts = [ (pkgs.nerdfonts.override { fonts = [ - "Hack" - "SourceCodePro" - ]; }) ]; - homebrew = { enable = true; onActivation = { @@ -53,7 +47,7 @@ taps = [ "hashicorp/tap" # "homebrew/bundle" - # "homebrew/cask-fonts" + "homebrew/cask-fonts" # "jandedobbeleer/oh-my-posh" "null-dev/firefox-profile-switcher" "puppetlabs/puppet" @@ -68,9 +62,9 @@ "cakebrew" "elgato-stream-deck" "firefox" - # "font-hack-nerd-font" - # "font-inconsolata-g-for-powerline" - # "font-source-code-pro-for-powerline" + "font-hack-nerd-font" + "font-inconsolata-g-for-powerline" + "font-source-code-pro-for-powerline" "google-drive" "iterm2" "keepingyouawake" @@ -116,7 +110,12 @@ ''; }; + programs.zsh.enable = true; + services.nix-daemon.enable = true; - users.users."gene.liverman".home = "/Users/gene.liverman"; + users.users."gene.liverman" = { + home = "/Users/gene.liverman"; + shell = pkgs.zsh; + }; }