From 89f9c7ed6e11c648e101f9a29b386315ce87380d Mon Sep 17 00:00:00 2001 From: Elias Almqvist Date: Thu, 25 Jul 2024 13:56:52 -0700 Subject: [PATCH] nix --- nix-darwin/flake.lock | 48 ---------------------------- nix-darwin/flake.nix | 69 ++++++++++++++++++++++++++++------------ nix-darwin/home.nix | 74 ++++++++++++++++++------------------------- 3 files changed, 79 insertions(+), 112 deletions(-) delete mode 100644 nix-darwin/flake.lock diff --git a/nix-darwin/flake.lock b/nix-darwin/flake.lock deleted file mode 100644 index 4d351a9..0000000 --- a/nix-darwin/flake.lock +++ /dev/null @@ -1,48 +0,0 @@ -{ - "nodes": { - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1721852138, - "narHash": "sha256-JH8N5uoqoVA6erV4O40VtKKHsnfmhvMGbxMNDLtim5o=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "304a011325b7ac7b8c9950333cd215a7aa146b0e", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1721782431, - "narHash": "sha256-UNDpwjYxNXQet/g3mgRLsQ9zxrbm9j2JEvP4ijF3AWs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "4f02464258baaf54992debfd010a7a3662a25536", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "home-manager": "home-manager", - "nixpkgs": "nixpkgs" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/nix-darwin/flake.nix b/nix-darwin/flake.nix index 6434606..1079b68 100644 --- a/nix-darwin/flake.nix +++ b/nix-darwin/flake.nix @@ -1,27 +1,54 @@ +{ config, pkgs, ... }: + { - description = "elal darwin nix config"; + home.username = "elal"; + home.homeDirectory = "/Users/elal"; + home.stateVersion = "22.11"; - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - home-manager = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + programs.home-manager.enable = true; + + home.packages = with pkgs; [ + alacritty + neovim + zsh + oh-my-zsh + skhd + yabai + ]; + + programs.alacritty = { + enable = true; + # Add any Alacritty-specific configurations here + }; + + programs.neovim = { + enable = true; + # Add any Neovim-specific configurations here }; - outputs = { self, nixpkgs, home-manager }: - let - system = "aarch64-darwin"; - pkgs = import nixpkgs { inherit system; }; - in - { - homeConfigurations.elal = home-manager.lib.homeManagerConfiguration { - inherit pkgs; - modules = [ - ./home.nix - ]; - }; - - packages.${system}.default = self.homeConfigurations.elal.activationPackage; + programs.zsh = { + enable = true; + oh-my-zsh = { + enable = true; + theme = "lambda"; }; + # Add any other Zsh-specific configurations here + }; + + home.file.".config/skhd/skhdrc".text = '' + # Add your skhd keybindings here + ''; + + home.file.".config/yabai/yabairc".text = '' + # Add your yabai configuration here + ''; + + # Optionally, you can add Homebrew integration if needed + # homebrew = { + # enable = true; + # onActivation.autoUpdate = true; + # onActivation.cleanup = "zap"; + # brews = []; + # casks = []; + # }; } diff --git a/nix-darwin/home.nix b/nix-darwin/home.nix index d2f306b..c8bfff4 100644 --- a/nix-darwin/home.nix +++ b/nix-darwin/home.nix @@ -3,66 +3,54 @@ { home.username = "elal"; home.homeDirectory = "/Users/elal"; - home.stateVersion = "23.05"; + home.stateVersion = "22.11"; programs.home-manager.enable = true; - # Packages to install home.packages = with pkgs; [ alacritty neovim - yabai + zsh + oh-my-zsh skhd + yabai ]; - # Yabai configuration - services.yabai = { + programs.alacritty = { enable = true; - extraConfig = '' - yabai -m config mouse_follows_focus off - yabai -m config focus_follows_mouse autoraise - yabai -m config window_placement second_child - yabai -m config window_topmost on - yabai -m config window_shadow off - yabai -m config window_opacity off - yabai -m config window_border off - ''; + # Add any Alacritty-specific configurations here }; - # skhd configuration - services.skhd = { + programs.neovim = { enable = true; - extraConfig = '' - # Example skhd configuration - alt - e : echo "Hello world" - ''; + viAlias = true; + vimAlias = true; + # Add any Neovim-specific configurations here }; - # Alacritty configuration - programs.alacritty = { + programs.zsh = { enable = true; - settings = { - font = { - normal = { - family = "Menlo"; - size = 12.0; - }; - }; - window = { - padding = { - x = 2; - y = 2; - }; - dynamic_padding = false; - }; - dynamic_title = true; - scrollback = 10000; + oh-my-zsh = { + enable = true; + theme = "lambda"; }; + # Add any other Zsh-specific configurations here }; - # Neovim configuration - programs.neovim = { - enable = true; - viAlias = true; - }; + home.file.".config/skhd/skhdrc".text = '' + # Add your skhd keybindings here + ''; + + home.file.".config/yabai/yabairc".text = '' + # Add your yabai configuration here + ''; + + # Optionally, you can add Homebrew integration if needed + # homebrew = { + # enable = true; + # onActivation.autoUpdate = true; + # onActivation.cleanup = "zap"; + # brews = []; + # casks = []; + # }; }