59 lines
1.8 KiB
Nix
59 lines
1.8 KiB
Nix
{
|
|
description = "NixOS flake";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
|
systems.url = "github:nix-systems/default-linux";
|
|
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.7.0";
|
|
opencode.url = "github:GutMutCode/opencode-nix/";
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-25.11";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
atuin.url = "github:atuinsh/atuin/v18.13.3";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, nix-flatpak, systems, home-manager, opencode, ... } @ inputs: let
|
|
inherit (self) outputs;
|
|
lib = nixpkgs.lib // home-manager.lib;
|
|
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-tree;
|
|
forEachSystem = f: lib.genAttrs (import systems) (system: f pkgsFor.${system});
|
|
pkgsFor = lib.genAttrs (import systems) (
|
|
system:
|
|
import nixpkgs {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
overlays = [
|
|
inputs.atuin.overlays.default
|
|
];
|
|
}
|
|
);
|
|
|
|
in {
|
|
inherit lib;
|
|
|
|
|
|
nixosConfigurations = {
|
|
limgrave = nixpkgs.lib.nixosSystem {
|
|
specialArgs = {inherit inputs;};
|
|
modules = [
|
|
nix-flatpak.nixosModules.nix-flatpak
|
|
./hosts/limgrave/nixos
|
|
({ ... }: {
|
|
nixpkgs.overlays = [ inputs.atuin.overlays.default opencode.overlays.default ];
|
|
})
|
|
];
|
|
};
|
|
};
|
|
|
|
homeConfigurations = {
|
|
"catalin@limgrave" = home-manager.lib.homeManagerConfiguration {
|
|
pkgs = pkgsFor.x86_64-linux;
|
|
extraSpecialArgs = {inherit inputs;};
|
|
modules = [
|
|
./hosts/limgrave/home/home.nix
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|