From 0c8fa3a2a270747f3dbb54fe8792f3f0aec997e3 Mon Sep 17 00:00:00 2001 From: Ryan Schanzenbacher Date: Mon, 3 Aug 2026 01:22:44 -0400 Subject: Initial commit: combined darwin + guix-linux home-manager flake Supersedes nix-dotfiles (darwin) and guix-dotfiles' ad-hoc nix-home-manager flake (linux). See README.md/MIGRATION.md. --- flake.nix | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 flake.nix (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..c5f593f --- /dev/null +++ b/flake.nix @@ -0,0 +1,99 @@ +{ + description = "Combined nix flake: darwin system (RyanMac) + standalone home-manager for Guix (ryan@linux)"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + + darwin = { + url = "github:nix-darwin/nix-darwin/master"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + # Shared between darwin and linux + zen-browser = { + url = "github:0xc000022070/zen-browser-flake"; + inputs = { + nixpkgs.follows = "nixpkgs"; + home-manager.follows = "home-manager"; + }; + }; + + # Darwin-only + netbird-tui = { + url = "git+https://git.rschanz.org/netbird-tui-flake"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nix-homebrew.url = "github:zhaofengli/nix-homebrew"; + homebrew-core = { + url = "github:homebrew/homebrew-core"; + flake = false; + }; + homebrew-cask = { + url = "github:homebrew/homebrew-cask"; + flake = false; + }; + virby.url = "github:quinneden/virby-nix-darwin"; + homebrew-netbird = { + url = "github:netbirdio/homebrew-tap"; + flake = false; + }; + homebrew-felixkratz = { + url = "github:FelixKratz/homebrew-formulae"; + flake = false; + }; + + # Linux-only. hyprland/hyprlock/hypridle/hyprpicker/wpaperd/kanshi/pyprland + # all now ship in nixpkgs itself, so only the pieces nixpkgs doesn't carry + # need their own flake input: + nixgl = { + # Ryan's fork exists to patch Guix's mesa/OpenGL mismatch, unrelated to + # nixpkgs version - keep tracking it regardless of the nixpkgs bump. + url = "github:ryan77627/nixGL"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + clipboard-sync = { + url = "github:dnut/clipboard-sync"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { nixpkgs, home-manager, ... }@inputs: { + darwinConfigurations."RyanMac" = inputs.darwin.lib.darwinSystem { + system = "aarch64-darwin"; + specialArgs = { inherit inputs; }; + modules = [ + { nixpkgs.config.allowUnfree = true; + nixpkgs.overlays = [ inputs.netbird-tui.overlays.default ]; } + inputs.virby.darwinModules.default + ./hosts/RyanMac/configuration.nix + home-manager.darwinModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.ryan = { + imports = [ + inputs.zen-browser.homeModules.beta + ./users/ryan/common.nix + ./users/ryan/darwin.nix + ]; + }; + } + ]; + }; + + homeConfigurations."ryan" = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.x86_64-linux; + extraSpecialArgs = { inherit inputs; }; + modules = [ + { nixpkgs.config.allowUnfree = true; } + inputs.zen-browser.homeModules.beta + ./users/ryan/common.nix + ./users/ryan/linux.nix + ]; + }; + }; +} -- cgit v1.3.1