57 lines
1.4 KiB
Nix
57 lines
1.4 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";
|
|
# Solaar
|
|
solaar = {
|
|
url = "https://flakehub.com/f/Svenum/Solaar-Flake/*.tar.gz";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
# Nixvim
|
|
nixvim = {
|
|
url = "github:cnsta/cnixvim";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
# Home manager
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
home-manager,
|
|
systems,
|
|
solaar,
|
|
...
|
|
} @ 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 = [
|
|
solaar.nixosModules.default
|
|
./nixos/configuration.nix
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|