125 lines · 3.0 KB
{
  description = "The Panther Room";

  inputs = {
    nixpkgs.url = "flake:nixpkgs";
    homeManager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    helix.url = "github:helix-editor/helix/master";
  };

  outputs = {
    self,
    nixpkgs,
    homeManager,
    ...
  } @ inputs: let
    lib = nixpkgs.lib;

    mkHome = {
      name,
      system,
      default,
      extraModules,
    }: let
      pkgs = inputs.nixpkgs.legacyPackages.${system};

      isDarwin = pkgs.stdenv.isDarwin;

      # Only build Helix from master on default targets (i.e. not on the
      # headless system).
      helixModule =
        if default
        then (import ./modules/helix) inputs.helix.packages.${system}.default
        else (import ./modules/helix) pkgs.helix;
    in
      {
        homeManagerConfigurations."${name}" = homeManager.lib.homeManagerConfiguration {
          inherit pkgs;