59 lines
1.6 KiB
Nix
59 lines
1.6 KiB
Nix
{
|
|
description = "Your new nix config";
|
|
|
|
inputs = {
|
|
# Nixpkgs
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
|
|
|
|
# Nixvim
|
|
inputs.nixvim = {
|
|
url = "github:cnsta/cnixvim";
|
|
};
|
|
# Home manager
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
home-manager,
|
|
systems,
|
|
...
|
|
} @ inputs: let
|
|
inherit (self) outputs;
|
|
lib = nixpkgs.lib // home-manager.lib;
|
|
forEachSystem = f: lib.genAttrs (import systems) (system: f pkgsFor.${system});
|
|
pkgsFor = lib.genAttrs (import systems) (
|
|
system:
|
|
import nixpkgs {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
}
|
|
);
|
|
in {
|
|
# NixOS configuration entrypoint
|
|
# Available through 'nixos-rebuild --flake .#your-hostname'
|
|
nixosConfigurations = {
|
|
cnix = nixpkgs.lib.nixosSystem {
|
|
specialArgs = {inherit inputs outputs;};
|
|
# > Our main nixos configuration file <
|
|
modules = [./nixos/configuration.nix];
|
|
};
|
|
};
|
|
|
|
# Standalone home-manager configuration entrypoint
|
|
# Available through 'home-manager --flake .#your-username@your-hostname'
|
|
homeConfigurations = {
|
|
"cnst@cnix" = home-manager.lib.homeManagerConfiguration {
|
|
pkgs = pkgsFor.x86_64-linux;
|
|
extraSpecialArgs = {inherit inputs outputs;};
|
|
# > Our main home-manager configuration file <
|
|
modules = [./home-manager/home.nix];
|
|
};
|
|
};
|
|
};
|
|
}
|