52 lines
1.3 KiB
Nix
52 lines
1.3 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 {
|
|
with myLib;
|
|
formatter = forEachSystem (pkgs: pkgs.alejandra);
|
|
|
|
homeManagerModules.default = ./modules/home-manager;
|
|
nixosModules.default = ./modules/nixos;
|
|
|
|
nixosConfigurations = {
|
|
# Main desktop for games & workstation
|
|
hummingbird = mkSystem ./hosts/hummingbird;
|
|
};
|
|
|
|
homeConfigurations = {
|
|
"luna@hummingbird" = mkHome "x86_64-linux" ./home-manager/luna/home.nix;
|
|
};
|
|
};
|
|
}
|