nix/flake.nix

137 lines
3.7 KiB
Nix

{
description = "Nixos configuration for Xeovalyte";
inputs = {
nixpkgs.url = "nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
nix-colors.url = "github:misterio77/nix-colors";
nixpkgs.follows = "nixos-cosmic/nixpkgs-stable";
nixos-cosmic = {
url = "github:lilyinstarlight/nixos-cosmic";
};
};
outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, home-manager, nix-colors, nixos-cosmic, ... }:
let
system = "x86_64-linux";
overlay-unstable = final: prev: {
unstable = import nixpkgs-unstable {
config.allowUnfree = true;
localSystem = { inherit system; };
};
};
in
{
# Laptop Configuration
nixosConfigurations = {
xv-laptop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
nixos-cosmic.nixosModules.default
./hosts/laptop
];
};
};
homeConfigurations = {
"xeovalyte@xv-laptop" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs nix-colors; };
modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
./hosts/laptop/home.nix
];
};
};
# Surface Configuration
nixosConfigurations = {
xv-surface = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
inputs.nixos-hardware.nixosModules.surface-go
./hosts/surface
];
};
};
homeConfigurations = {
"xeovalyte@xv-surface" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs nix-colors; };
modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
./hosts/surface/home.nix
];
};
};
nixosConfigurations = {
xv-desktop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
./hosts/desktop
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.backupFileExtension = "backup";
home-manager.extraSpecialArgs = { inherit inputs nix-colors; };
home-manager.users.xeovalyte.imports = [ ./hosts/desktop/home.nix ];
}
];
};
};
# pm01vm01 Configuration
nixosConfigurations = {
pm01vm01 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
./hosts/pm01vm01
];
};
};
homeConfigurations = {
"xeovalyte@pm01vm01" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs nix-colors; };
modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
./hosts/pm01vm01/home.nix
];
};
};
};
}