53 lines
1.5 KiB
Nix
53 lines
1.5 KiB
Nix
{
|
|
description = "nixos config for nxs";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
nixvim = {
|
|
url = "github:nix-community/nixvim";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
nix-ai-tools.url = "github:numtide/nix-ai-tools";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, home-manager, flake-utils, nixvim, nix-ai-tools } @ inputs: {
|
|
# Reusable modules
|
|
homeManagerModules.copilot-cli = import ./modules/home/copilot-cli.nix;
|
|
nixosModules.auto-upgrade = import ./modules/system/auto-upgrade.nix;
|
|
|
|
# Host configurations
|
|
nixosConfigurations.nxs = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
specialArgs = { inherit inputs; };
|
|
modules = [
|
|
./hosts/nxs
|
|
./hosts/nxs/hardware.nix
|
|
self.nixosModules.auto-upgrade
|
|
home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager = {
|
|
useGlobalPkgs = true;
|
|
useUserPackages = true;
|
|
extraSpecialArgs = { inherit inputs; };
|
|
users.narrator = import ./hosts/nxs/home.nix;
|
|
sharedModules = [
|
|
self.homeManagerModules.copilot-cli
|
|
];
|
|
};
|
|
nixos.autoUpgrade = {
|
|
enable = true;
|
|
flakePath = self.outPath;
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
}
|
|
|