From d0ae2e6a32f0970f40f4f4ca5f18e020d15520bb Mon Sep 17 00:00:00 2001 From: Leni Aniva Date: Sat, 23 Nov 2024 22:35:56 -0800 Subject: [PATCH] feat: Add config for tetrahedrite --- flake.nix | 9 +++++-- .../configuration.nix | 24 ++++++++++++++++--- nix-darwin/homebrew.nix | 13 ++++++++++ nix-darwin/yabai-skhd.nix | 13 ++++++++++ 4 files changed, 54 insertions(+), 5 deletions(-) rename configuration.nix => nix-darwin/configuration.nix (50%) create mode 100644 nix-darwin/homebrew.nix create mode 100644 nix-darwin/yabai-skhd.nix diff --git a/flake.nix b/flake.nix index f114aed..c95110c 100644 --- a/flake.nix +++ b/flake.nix @@ -10,8 +10,13 @@ }; outputs = inputs@{ self, nixpkgs-darwin, nix-darwin }: { - darwinConfigurations."sphalerite" = nix-darwin.lib.darwinSystem { - modules = [ ./configuration.nix ]; + darwinConfigurations."tetrahedrite" = nix-darwin.lib.darwinSystem { + modules = [ + ./nix-darwin/configuration.nix + { + nixpkgs.hostPlatform = "x86_64-darwin"; + } + ]; }; }; } diff --git a/configuration.nix b/nix-darwin/configuration.nix similarity index 50% rename from configuration.nix rename to nix-darwin/configuration.nix index 218c90b..53db094 100644 --- a/configuration.nix +++ b/nix-darwin/configuration.nix @@ -1,5 +1,6 @@ { config, pkgs, ... }: { + imports = [ ./homebrew.nix ./yabai-skhd.nix ]; # List packages installed in system profile. To search by name, run: # $ nix-env -qaP | grep wget environment.systemPackages = [ @@ -7,13 +8,30 @@ ]; # Auto upgrade nix package and the daemon service. - services.nix-daemon.enable = true; - nix.package = pkgs.nix; + services = { + nix-daemon.enable = true; + karabiner-elements.enable = true; + sketchybar = { + enable = true; + }; + }; + nix = { + package = pkgs.nix; + settings.experimental-features = "nix-command flakes"; + }; # Enable alternative shell support in nix-darwin. programs.fish.enable = true; # Used for backwards compatibility, please read the changelog before changing. # $ darwin-rebuild changelog - system.stateVersion = 5; + system = { + stateVersion = 5; + defaults = { + dock = { + autohide = true; + orientation = "bottom"; + }; + }; + }; } diff --git a/nix-darwin/homebrew.nix b/nix-darwin/homebrew.nix new file mode 100644 index 0000000..3a3f7c0 --- /dev/null +++ b/nix-darwin/homebrew.nix @@ -0,0 +1,13 @@ +{ ... }: +{ + homebrew = { + enable = true; + casks = [ + "karabiner-elements" + "vlc" + ]; + taps = [ + "railwaycat/emacsmacport" + ]; + }; +} diff --git a/nix-darwin/yabai-skhd.nix b/nix-darwin/yabai-skhd.nix new file mode 100644 index 0000000..93ef892 --- /dev/null +++ b/nix-darwin/yabai-skhd.nix @@ -0,0 +1,13 @@ +{ ... }: +{ + services = { + yabai = { + enable = true; + extraConfig = builtins.readFile ../yabai/yabairc; + }; + skhd = { + enable = true; + skhdConfig = builtins.readFile ../skhd/skhdrc; + }; + }; +}