nix-configs/flake.nix

74 lines
1.8 KiB
Nix
Raw Normal View History

2025-06-06 06:46:08 +01:00
{
description = "I have no idea what I'm doing";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
2025-06-06 11:09:23 +01:00
nur = {
url = "github:nix-community/NUR";
inputs.nixpkgs.follows = "nixpkgs";
};
2025-06-06 06:46:08 +01:00
};
outputs =
{
nixpkgs,
flake-utils,
home-manager,
2025-06-06 11:09:23 +01:00
nur,
2025-06-06 06:46:08 +01:00
...
}:
let
supportedSystems = [
"x86_64-linux"
"aarch64-darwin"
"aarch64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
overlays = [
nur.overlays.default
];
in
2025-06-06 06:46:08 +01:00
{
nixosConfigurations = {
laptop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./nixos/common.nix
./nixos/hosts/laptop/default.nix
./nixos/hosts/laptop/hardware-configuration.nix
];
};
};
homeConfigurations = nixpkgs.lib.foldl' (
acc: system:
acc
// {
"irl-${system}" = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {
inherit system overlays;
};
modules = [ ./home/irl.nix ];
2025-06-06 11:09:23 +01:00
};
"irl-gui-${system}" = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {
inherit system overlays;
};
modules = [
./home/irl.nix
{
irl.gui-packages = true;
}
2025-06-06 11:09:23 +01:00
];
};
}
) { } supportedSystems;
}
// flake-utils.lib.eachSystem supportedSystems (system: {
formatter = nixpkgs.legacyPackages.${system}.nixfmt-rfc-style;
2025-06-06 06:46:08 +01:00
});
}