2023-03-09 08:33:38 +00:00
|
|
|
{
|
2023-04-02 18:01:14 +01:00
|
|
|
description = "Maddie's Nix configurations";
|
2023-03-09 08:33:38 +00:00
|
|
|
|
|
|
|
inputs = {
|
|
|
|
# Home manager
|
|
|
|
home-manager.url = "github:nix-community/home-manager";
|
|
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
2023-04-02 16:03:21 +01:00
|
|
|
|
|
|
|
darwin.url = "github:LnL7/nix-darwin";
|
|
|
|
darwin.inputs.nixpkgs.follows = "nixpkgs";
|
2023-03-09 08:33:38 +00:00
|
|
|
};
|
|
|
|
|
2023-04-02 16:03:21 +01:00
|
|
|
outputs = { self, nixpkgs, home-manager, darwin }:
|
2023-03-09 08:33:38 +00:00
|
|
|
let
|
2023-03-29 06:58:29 +01:00
|
|
|
username = "maddie";
|
2023-04-02 18:01:14 +01:00
|
|
|
utils = import ./utils nixpkgs;
|
|
|
|
|
|
|
|
nixpkgs_x86_64 = import nixpkgs {
|
|
|
|
config.allowUnfree = true;
|
|
|
|
config.allowUnsupportedSystem = false;
|
|
|
|
config.allowBroken = false;
|
|
|
|
overlays = import ./overlays.nix;
|
|
|
|
system = "x86_64-linux";
|
|
|
|
};
|
|
|
|
|
|
|
|
nixpkgs_aarch64 = import nixpkgs {
|
|
|
|
config.allowUnfree = true;
|
|
|
|
config.allowUnsupportedSystem = false;
|
|
|
|
config.allowBroken = false;
|
|
|
|
overlays = import ./overlays.nix;
|
|
|
|
system = "aarch64-darwin";
|
|
|
|
};
|
2023-03-09 08:33:38 +00:00
|
|
|
in
|
|
|
|
{
|
2023-04-15 19:27:45 +01:00
|
|
|
nixosConfigurations."MDesktop" = nixpkgs.lib.nixosSystem {
|
2023-04-02 18:01:14 +01:00
|
|
|
specialArgs = { inherit username; };
|
|
|
|
pkgs = nixpkgs_x86_64;
|
2023-04-02 16:03:21 +01:00
|
|
|
system = "x86_64-linux";
|
2023-03-29 06:58:29 +01:00
|
|
|
modules = [
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
{
|
2023-04-02 16:03:21 +01:00
|
|
|
home-manager.users.${username}.imports = utils.nixFilesIn ./maddie/common ++ utils.nixFilesIn ./maddie/nixos;
|
2023-04-02 18:01:14 +01:00
|
|
|
home-manager.extraSpecialArgs = { inherit username; pkgs = nixpkgs_x86_64; };
|
2023-03-29 06:58:29 +01:00
|
|
|
}
|
2023-04-02 18:01:14 +01:00
|
|
|
] ++ utils.nixFilesIn ./systems/mdesktop;
|
2023-03-29 06:58:29 +01:00
|
|
|
};
|
|
|
|
|
2023-04-02 18:01:14 +01:00
|
|
|
darwinConfigurations."MMacBookPro" = darwin.lib.darwinSystem
|
|
|
|
{
|
|
|
|
pkgs = nixpkgs_aarch64;
|
|
|
|
specialArgs = { inherit username; };
|
2023-04-02 16:03:21 +01:00
|
|
|
system = "aarch64-darwin";
|
2023-03-29 06:58:29 +01:00
|
|
|
modules = [
|
|
|
|
home-manager.darwinModules.home-manager
|
|
|
|
{
|
2023-04-02 16:03:21 +01:00
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
home-manager.users.${username}.imports = utils.nixFilesIn ./maddie/common ++ utils.nixFilesIn ./maddie/macos;
|
2023-04-02 18:01:14 +01:00
|
|
|
home-manager.extraSpecialArgs = { inherit username; pkgs = nixpkgs_aarch64; };
|
2023-03-29 06:58:29 +01:00
|
|
|
}
|
2023-04-02 18:01:14 +01:00
|
|
|
] ++ utils.nixFilesIn ./systems/mmacbookpro;
|
2023-03-09 08:33:38 +00:00
|
|
|
};
|
|
|
|
|
2023-04-02 18:01:14 +01:00
|
|
|
formatter.x86_64-linux = nixpkgs_x86_64.legacyPackages.x86_64-linux.nixpkgs-fmt;
|
|
|
|
formatter.aarch64-darwin = nixpkgs_aarch64.legacyPackages.aarch64-darwin.nixpkgs-fmt;
|
2023-03-09 08:33:38 +00:00
|
|
|
};
|
|
|
|
}
|
2023-04-02 18:01:14 +01:00
|
|
|
|