From f35f2a877c0f3895c2caa27e3fc0e714c5610995 Mon Sep 17 00:00:00 2001 From: Tyler Mayoff Date: Fri, 6 Dec 2024 14:53:06 -0500 Subject: [PATCH] Reorg and updates to support macos - Split kitty to it's own file - Updated flake.nix to support multiple systems - Updated flake.lock --- dot_config/flake/flake.lock | 48 +++++++++++++++++++++++---- dot_config/flake/flake.nix | 32 +++++++++--------- dot_config/flake/home/gui.nix | 16 +-------- dot_config/flake/home/hinge/hinge.nix | 28 +++++++++------- dot_config/flake/home/kitty.nix | 16 +++++++++ 5 files changed, 91 insertions(+), 49 deletions(-) create mode 100644 dot_config/flake/home/kitty.nix diff --git a/dot_config/flake/flake.lock b/dot_config/flake/flake.lock index d67a10b..d613a21 100644 --- a/dot_config/flake/flake.lock +++ b/dot_config/flake/flake.lock @@ -19,6 +19,24 @@ "inputs": { "systems": "systems" }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, "locked": { "lastModified": 1726560853, "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", @@ -33,7 +51,7 @@ "type": "github" } }, - "flake-utils_2": { + "flake-utils_3": { "locked": { "lastModified": 1659877975, "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", @@ -51,7 +69,7 @@ "helix": { "inputs": { "crane": "crane", - "flake-utils": "flake-utils", + "flake-utils": "flake-utils_2", "nixpkgs": "nixpkgs", "rust-overlay": "rust-overlay" }, @@ -91,7 +109,7 @@ }, "nixgl": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils_3", "nixpkgs": "nixpkgs_2" }, "locked": { @@ -157,22 +175,23 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1733016324, - "narHash": "sha256-8qwPSE2g1othR1u4uP86NXxm6i7E9nHPyJX3m3lx7Q4=", + "lastModified": 1733412085, + "narHash": "sha256-FillH0qdWDt/nlO6ED7h4cmN+G9uXwGjwmCnHs0QVYM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "7e1ca67996afd8233d9033edd26e442836cc2ad6", + "rev": "4dc2fc4e62dbf62b84132fe526356fbac7b03541", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-24.05", + "ref": "nixos-24.11", "repo": "nixpkgs", "type": "github" } }, "root": { "inputs": { + "flake-utils": "flake-utils", "helix": "helix", "home-manager": "home-manager", "nixgl": "nixgl", @@ -215,6 +234,21 @@ "repo": "default", "type": "github" } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/dot_config/flake/flake.nix b/dot_config/flake/flake.nix index 839f39e..a9f5f3e 100644 --- a/dot_config/flake/flake.nix +++ b/dot_config/flake/flake.nix @@ -2,7 +2,7 @@ description = "Home manager flake"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; home-manager = { url = "github:nix-community/home-manager"; @@ -21,16 +21,18 @@ } @ inputs: let inherit (self) outputs; - system = "aarch64-darwin"; - in rec { - pkgs = import nixpkgs { - inherit system; - config.allowUnfree = true; - }; + systems = [ + "x86_64-linux" + "aarch64-darwin" + ]; + forAllSystems = nixpkgs.lib.genAttrs systems; + + allPkgs = forAllSystems (system: import nixpkgs {inherit system;}); + in { overlays = import ./overlays {inherit inputs;}; - defaultPackage.${system} = home-manager.defaultPackage.${system}; + defaultPackage = forAllSystems (system: home-manager.defaultPackage.${system}); nixosConfigurations = { mal = nixpkgs.lib.nixosSystem { @@ -41,27 +43,27 @@ homeConfigurations = { "tyler@guidebolt" = home-manager.lib.homeManagerConfiguration { - inherit pkgs; + pkgs = allPkgs."x86_64-linux"; extraSpecialArgs = {inherit inputs outputs;}; modules = [./home/guidebolt/guidebolt.nix]; }; "tyler@wash" = home-manager.lib.homeManagerConfiguration { - inherit pkgs; + pkgs = allPkgs."x86_64-linux"; extraSpecialArgs = {inherit inputs outputs;}; modules = [./home/wash/wash.nix]; }; "tyler@mal" = home-manager.lib.homeManagerConfiguration { - inherit pkgs; + pkgs = allPkgs; extraSpecialArgs = {inherit inputs outputs;}; modules = [./home/mal/mal.nix]; }; - "tyler.mayoff@MAC-C57KK2TC69" = home-manager.lib.homeManagerConfiguration{ - inherit pkgs; - extraSpecialArgs = {inherit inputs outputs; }; - modules = [./home/hinge/hinge.nix]; + "tyler.mayoff@MAC-C57KK2TC69" = home-manager.lib.homeManagerConfiguration { + pkgs = allPkgs."aarch64-darwin"; + extraSpecialArgs = {inherit inputs outputs;}; + modules = [./home/hinge/hinge.nix]; }; }; }; diff --git a/dot_config/flake/home/gui.nix b/dot_config/flake/home/gui.nix index 7873710..38172ae 100644 --- a/dot_config/flake/home/gui.nix +++ b/dot_config/flake/home/gui.nix @@ -5,6 +5,7 @@ ... }: { imports = [ + ./kitty.nix ]; nixGL.packages = inputs.nixgl.packages; @@ -24,21 +25,6 @@ # programs.vscode.enable = true; - programs.kitty = { - enable = true; - package = config.lib.nixGL.wrap pkgs.kitty; - font = { - name = "JetBrainsMono Nerd Font"; - # package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}; - }; - - settings = { - disable_ligatures = "cursor"; - }; - - themeFile = "Catppuccin-Macchiato"; - }; - programs.alacritty = { enable = true; package = config.lib.nixGL.wrap pkgs.alacritty; diff --git a/dot_config/flake/home/hinge/hinge.nix b/dot_config/flake/home/hinge/hinge.nix index fe612ed..e61c563 100644 --- a/dot_config/flake/home/hinge/hinge.nix +++ b/dot_config/flake/home/hinge/hinge.nix @@ -1,20 +1,24 @@ { - inputs, - outputs, lib, - config, pkgs, ... -}: { - imports = [../common.nix]; - - home.username =lib.mkForce "tyler.mayoff"; +}: let + # mac-app-util-src = builtins.fetchTarball { + # url = "https://github.com/hraban/mac-app-util/archive/master.tar.gz"; + # sha256 = "1w80vjcnaysjlzxsp3v4pxq4yswbjvxs8ann2bk0m7rkjljnzz6m"; + # }; + # mac-app-util = import mac-app-util-src {}; +in { + imports = [ + ../common.nix + ../kitty.nix + # mac-app-util.homeManagerModules.default + ]; + + home.username = lib.mkForce "tyler.mayoff"; home.homeDirectory = lib.mkForce "/Users/tyler.mayoff"; home.packages = with pkgs; [ - - bazel ]; - - # home.stateVersion = "23.11"; - + bazel_7 + ]; } diff --git a/dot_config/flake/home/kitty.nix b/dot_config/flake/home/kitty.nix new file mode 100644 index 0000000..6730cec --- /dev/null +++ b/dot_config/flake/home/kitty.nix @@ -0,0 +1,16 @@ +{pkgs, config, ...}: { + programs.kitty = { + enable = true; + package = config.lib.nixGL.wrap pkgs.kitty; + font = { + name = "JetBrainsMono Nerd Font"; + package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}; + }; + + settings = { + disable_ligatures = "cursor"; + }; + + themeFile = "Catppuccin-Macchiato"; + }; +}