63 lines
1.5 KiB
Nix
63 lines
1.5 KiB
Nix
{
|
|
description = "Nixos config flake";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11";
|
|
|
|
alejandra.url = "github:kamadorueda/alejandra/3.1.0";
|
|
alejandra.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
home-manager,
|
|
systems,
|
|
...
|
|
} @ inputs: let
|
|
inherit (self) outputs;
|
|
|
|
# copied from https://github.com/Misterio77/nix-config/blob/main/flake.nix
|
|
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 {
|
|
inherit lib;
|
|
nixosModules = import ./modules/nixos;
|
|
homeManagerModules = import ./modules/home-manager;
|
|
|
|
formatter = forEachSystem (pkgs: pkgs.alejandra);
|
|
|
|
nixosConfigurations = {
|
|
# Main desktop for games & workstation
|
|
hummingbird = lib.nixosSystem {
|
|
specialArgs = {inherit inputs outputs;};
|
|
modules = [
|
|
./hosts/hummingbird
|
|
];
|
|
};
|
|
};
|
|
|
|
homeConfigurations = {
|
|
"luna" = lib.homeManagerConfiguration {
|
|
pkgs = pkgsFor.x86_64-linux;
|
|
extraSpecialArgs = {inherit inputs outputs;};
|
|
modules = [
|
|
./home-manager/luna/hummingbird.nix
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|