Reorg and updates to support macos

- Split kitty to it's own file
- Updated flake.nix to support multiple systems
- Updated flake.lock
This commit is contained in:
Tyler Mayoff 2024-12-06 14:53:06 -05:00
parent dbc85aea94
commit f35f2a877c
5 changed files with 91 additions and 49 deletions

View file

@ -19,6 +19,24 @@
"inputs": { "inputs": {
"systems": "systems" "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": { "locked": {
"lastModified": 1726560853, "lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
@ -33,7 +51,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_2": { "flake-utils_3": {
"locked": { "locked": {
"lastModified": 1659877975, "lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
@ -51,7 +69,7 @@
"helix": { "helix": {
"inputs": { "inputs": {
"crane": "crane", "crane": "crane",
"flake-utils": "flake-utils", "flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
@ -91,7 +109,7 @@
}, },
"nixgl": { "nixgl": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
@ -157,22 +175,23 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1733016324, "lastModified": 1733412085,
"narHash": "sha256-8qwPSE2g1othR1u4uP86NXxm6i7E9nHPyJX3m3lx7Q4=", "narHash": "sha256-FillH0qdWDt/nlO6ED7h4cmN+G9uXwGjwmCnHs0QVYM=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "7e1ca67996afd8233d9033edd26e442836cc2ad6", "rev": "4dc2fc4e62dbf62b84132fe526356fbac7b03541",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-24.05", "ref": "nixos-24.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils",
"helix": "helix", "helix": "helix",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixgl": "nixgl", "nixgl": "nixgl",
@ -215,6 +234,21 @@
"repo": "default", "repo": "default",
"type": "github" "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", "root": "root",

View file

@ -2,7 +2,7 @@
description = "Home manager flake"; description = "Home manager flake";
inputs = { 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"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
@ -21,16 +21,18 @@
} @ inputs: let } @ inputs: let
inherit (self) outputs; inherit (self) outputs;
system = "aarch64-darwin"; systems = [
in rec { "x86_64-linux"
pkgs = import nixpkgs { "aarch64-darwin"
inherit system; ];
config.allowUnfree = true;
};
forAllSystems = nixpkgs.lib.genAttrs systems;
allPkgs = forAllSystems (system: import nixpkgs {inherit system;});
in {
overlays = import ./overlays {inherit inputs;}; overlays = import ./overlays {inherit inputs;};
defaultPackage.${system} = home-manager.defaultPackage.${system}; defaultPackage = forAllSystems (system: home-manager.defaultPackage.${system});
nixosConfigurations = { nixosConfigurations = {
mal = nixpkgs.lib.nixosSystem { mal = nixpkgs.lib.nixosSystem {
@ -41,25 +43,25 @@
homeConfigurations = { homeConfigurations = {
"tyler@guidebolt" = home-manager.lib.homeManagerConfiguration { "tyler@guidebolt" = home-manager.lib.homeManagerConfiguration {
inherit pkgs; pkgs = allPkgs."x86_64-linux";
extraSpecialArgs = {inherit inputs outputs;}; extraSpecialArgs = {inherit inputs outputs;};
modules = [./home/guidebolt/guidebolt.nix]; modules = [./home/guidebolt/guidebolt.nix];
}; };
"tyler@wash" = home-manager.lib.homeManagerConfiguration { "tyler@wash" = home-manager.lib.homeManagerConfiguration {
inherit pkgs; pkgs = allPkgs."x86_64-linux";
extraSpecialArgs = {inherit inputs outputs;}; extraSpecialArgs = {inherit inputs outputs;};
modules = [./home/wash/wash.nix]; modules = [./home/wash/wash.nix];
}; };
"tyler@mal" = home-manager.lib.homeManagerConfiguration { "tyler@mal" = home-manager.lib.homeManagerConfiguration {
inherit pkgs; pkgs = allPkgs;
extraSpecialArgs = {inherit inputs outputs;}; extraSpecialArgs = {inherit inputs outputs;};
modules = [./home/mal/mal.nix]; modules = [./home/mal/mal.nix];
}; };
"tyler.mayoff@MAC-C57KK2TC69" = home-manager.lib.homeManagerConfiguration { "tyler.mayoff@MAC-C57KK2TC69" = home-manager.lib.homeManagerConfiguration {
inherit pkgs; pkgs = allPkgs."aarch64-darwin";
extraSpecialArgs = {inherit inputs outputs;}; extraSpecialArgs = {inherit inputs outputs;};
modules = [./home/hinge/hinge.nix]; modules = [./home/hinge/hinge.nix];
}; };

View file

@ -5,6 +5,7 @@
... ...
}: { }: {
imports = [ imports = [
./kitty.nix
]; ];
nixGL.packages = inputs.nixgl.packages; nixGL.packages = inputs.nixgl.packages;
@ -24,21 +25,6 @@
# programs.vscode.enable = true; # 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 = { programs.alacritty = {
enable = true; enable = true;
package = config.lib.nixGL.wrap pkgs.alacritty; package = config.lib.nixGL.wrap pkgs.alacritty;

View file

@ -1,20 +1,24 @@
{ {
inputs,
outputs,
lib, lib,
config,
pkgs, pkgs,
... ...
}: { }: let
imports = [../common.nix]; # 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.username = lib.mkForce "tyler.mayoff";
home.homeDirectory = lib.mkForce "/Users/tyler.mayoff"; home.homeDirectory = lib.mkForce "/Users/tyler.mayoff";
home.packages = with pkgs; [ home.packages = with pkgs; [
bazel_7
bazel ]; ];
# home.stateVersion = "23.11";
} }

View file

@ -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";
};
}