62 lines
1.5 KiB
Nix
62 lines
1.5 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";
|
|
};
|
|
# Neovim Nightly
|
|
neovim-nightly-overlay = {
|
|
url = "github:nix-community/neovim-nightly-overlay";
|
|
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
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|