nixos/flake.nix
Julian Sutter 19898751a8 ai.nix
2025-11-03 13:40:55 -08:00

81 lines
2.3 KiB
Nix

{
description = "Julian's system configuration";
inputs = {
nixpkgs.url = "nixpkgs/nixos-25.05";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
home-manager = {
url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "nixpkgs";
};
plasma-manager = {
url = "github:nix-community/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
hyprland.url = "github:hyprwm/Hyprland";
};
outputs = { self, nixpkgs, nixpkgs-unstable, nixos-hardware, home-manager, plasma-manager, hyprland }:
let
system = "x86_64-linux";
# Common specialArgs for all systems
commonSpecialArgs = {
pkgs-unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
};
# Helper function to create a system configuration
mkSystem = { modules, hardware ? [] }: nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = commonSpecialArgs;
modules = [
home-manager.nixosModules.home-manager
] ++ hardware ++ modules;
};
# Common desktop modules
commonDesktopModules = [
./systems/common.nix
./users/jsutter.nix
./desktop/plasma.nix
./desktop/dev.nix
./desktop/office.nix
./desktop/gaming.nix
./desktop/media.nix
./desktop/virtualization.nix
];
in {
nixosConfigurations = {
framework = mkSystem {
hardware = [ nixos-hardware.nixosModules.framework-13-ai-300-amd ];
modules = commonDesktopModules ++ [
./systems/framework.nix
./desktop/ai.nix
];
};
aurora = mkSystem {
modules = commonDesktopModules ++ [
./systems/aurora.nix
./desktop/tailscale.nix
./users/isutter.nix
./users/aksutter.nix
./desktop/3dprinting.nix
./desktop/2dprinting.nix
./desktop/ai.nix
];
};
labrizor = mkSystem {
modules = commonDesktopModules ++ [
./systems/labrizor.nix
./users/jsutter.nix
];
};
};
};
}