85 lines
2.2 KiB
Nix
85 lines
2.2 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";
|
|
|
|
nix-software-center.url = "github:snowfallorg/nix-software-center";
|
|
nixos-conf-editor.url = "github:snowfallorg/nixos-conf-editor";
|
|
|
|
nix-vscode-extensions = {
|
|
url = "github:nix-community/nix-vscode-extensions";
|
|
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;
|
|
|
|
homeManagerModules.default = ./modules/home-manager;
|
|
nixosModules.default = ./modules/nixos;
|
|
|
|
overlays = import ./overlays {inherit inputs outputs;};
|
|
formatter = forEachSystem (pkgs: pkgs.alejandra);
|
|
|
|
nixosConfigurations = {
|
|
# Yes, my computers are named after the Earthbound Immortals from Yu-Gi-Oh! 5D's :3
|
|
|
|
# Main desktop for games & workstation
|
|
# Alternative Name: Aslla piscu
|
|
hummingbird = lib.nixosSystem {
|
|
specialArgs = {inherit inputs outputs;};
|
|
modules = [
|
|
./hosts/hummingbird
|
|
];
|
|
};
|
|
|
|
# smol Thinkpad Yoga
|
|
# Alternative Name: Uru
|
|
spider = lib.nixosSystem {
|
|
specialArgs = {inherit inputs outputs;};
|
|
modules = [
|
|
./hosts/spider
|
|
];
|
|
};
|
|
};
|
|
|
|
homeConfigurations = {
|
|
"luna" = lib.homeManagerConfiguration {
|
|
pkgs = pkgsFor.x86_64-linux;
|
|
extraSpecialArgs = {inherit inputs outputs;};
|
|
modules = [
|
|
./home-manager/luna/home.nix
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|