Files
nixos/flake.nix
T
2025-07-03 16:34:49 -05:00

71 lines
1.7 KiB
Nix

{
description = "A rewrite of the original Sakamoto NixOS config.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils = {
url = "github:numtide/flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
darwin = {
url = "github:lnl7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
flake-utils,
home-manager,
darwin,
...
} @ inputs:
flake-utils.lib.eachDefaultSystem (
system: let
config = import ./config.nix;
lib = nixpkgs.lib;
pkgs = nixpkgs.legacyPackages.${system};
args = {inherit inputs system;} // config;
in {
nixosConfigurations = {
desktop = lib.nixosSystem {
inherit system;
specialArgs = args;
modules = [];
};
};
homeConfigurations = {
desktop = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {
inherit system;
extraSpecialArgs = args;
modules = [];
};
};
};
darwinConfigurations = {
macos = darwin.lib.darwinSystem {
inherit system;
specialArgs = args;
modules = [
./hosts/macos/darwin.nix
home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = args;
}
];
};
};
}
);
}