85 lines
2.2 KiB
Nix
Executable file
85 lines
2.2 KiB
Nix
Executable file
{
|
|
description = "duumxh flake config";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
nix-homebrew.url = "github:zhaofengli/nix-homebrew";
|
|
nix-darwin = {
|
|
url = "github:nix-darwin/nix-darwin/master";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
nixos-wsl = {
|
|
url = "github:nix-community/NixOS-WSL/main";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
homebrew-core = {
|
|
url = "github:homebrew/homebrew-core";
|
|
flake = false;
|
|
};
|
|
homebrew-cask = {
|
|
url = "github:homebrew/homebrew-cask";
|
|
flake = false;
|
|
};
|
|
homebrew-bundle = {
|
|
url = "github:homebrew/homebrew-bundle";
|
|
flake = false;
|
|
};
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
sops-nix = {
|
|
url = "github:Mic92/sops-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = inputs@{ self, nixpkgs, nix-darwin, nixos-wsl, nix-homebrew, homebrew-core, homebrew-cask, homebrew-bundle, home-manager, sops-nix }: {
|
|
darwinConfigurations."Dens-MacBook" = nix-darwin.lib.darwinSystem {
|
|
system = "aarch64-darwin";
|
|
modules = [
|
|
./mbp/configuration.nix
|
|
sops-nix.darwinModules.sops
|
|
|
|
nix-homebrew.darwinModules.nix-homebrew {
|
|
nix-homebrew = {
|
|
enable = true;
|
|
enableRosetta = true;
|
|
user = "duumxh";
|
|
taps = {
|
|
"homebrew/homebrew-core" = homebrew-core;
|
|
"homebrew/homebrew-cask" = homebrew-cask;
|
|
"homebrew/homebrew-bundle" = homebrew-bundle;
|
|
};
|
|
mutableTaps = false;
|
|
};
|
|
}
|
|
|
|
home-manager.darwinModules.home-manager {
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.users.duumxh = import ./mbp/home.nix;
|
|
}
|
|
];
|
|
};
|
|
darwinPackages = self.darwinConfigurations."Dens-MacBook".pkgs;
|
|
|
|
nixosConfigurations = {
|
|
nixos = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
nixos-wsl.nixosModules.default {
|
|
system.stateVersion = "25.05";
|
|
wsl.enable = true;
|
|
}
|
|
/home/duumxh/Nix/wsl/configuration.nix
|
|
home-manager.nixosModules.home-manager {
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.users.duumxh = /home/duumxh/Nix/wsl/home.nix;
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|