61 lines
1.8 KiB
Nix
61 lines
1.8 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/nixos-25.05";
|
|
|
|
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: {
|
|
|
|
|
|
|
|
homeManagerModules.copilot-cli = { lib, pkgs, config, inputs, ... }: {
|
|
options.programs.copilot-cli.enable = lib.mkEnableOption "";
|
|
config = lib.mkIf config.programs.copilot-cli.enable {
|
|
home.packages = [
|
|
(inputs.nix-ai-tools.packages.${pkgs.system}.copilot-cli or
|
|
(inputs.nixpkgs.legacyPackages.${pkgs.system}.fetchgit {
|
|
url = "github:numtide/nix-ai-tools";
|
|
ref = "main";
|
|
}).packages.${pkgs.system}.copilot-cli)
|
|
];
|
|
};
|
|
};
|
|
|
|
nixosConfigurations.nxs = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
./hosts/nxs/configuration.nix
|
|
./hosts/nxs/hardware-configuration.nix
|
|
home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.extraSpecialArgs = { inherit inputs; };
|
|
home-manager.users.narrator = import ./hosts/nxs/home.nix;
|
|
system.autoUpgrade = {
|
|
enable = true;
|
|
flake = self.outPath; # <<< here use self.outPath directly, NOT inputs.self
|
|
flags = [ "-L" ];
|
|
dates = "02:00";
|
|
randomizedDelaySec = "45min";
|
|
operation = "switch";
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
}
|
|
|