This repository has been archived on 2024-05-02. You can view files and clone it, but cannot push or open issues or pull requests.
home-manager-flake/flake.nix

76 lines
2.0 KiB
Nix

{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
home-manager = {
url = "github:nix-community/home-manager";
};
neovim-nightly-overlay = {
url = "github:nix-community/neovim-nightly-overlay";
};
neovim = {
url = "git+ssh://gitea@pi1.odie.intranet/odie/neovim-flake";
};
};
outputs = inputs@{ self, nixpkgs, flake-utils, home-manager, ... }:
let
inherit (self) outputs;
inputOverlays = [
inputs.neovim-nightly-overlay.overlays.default
inputs.neovim.overlays.default
];
overlays = [
(final: _prev: {
unstable = import inputs.nixpkgs-unstable {
inherit (final) system;
config.allowUnfree = true;
overlays = inputOverlays;
};
})
] ++ inputOverlays;
mkPkgs = system:
import nixpkgs {
inherit system overlays;
};
in
rec {
homeManagerModules = [
(import ./modules)
];
homeConfigurations = {
"odie@asgard" = home-manager.lib.homeManagerConfiguration {
pkgs = (mkPkgs "x86_64-linux").unstable;
extraSpecialArgs = { inherit inputs outputs; };
modules = homeManagerModules;
};
};
packages = flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = mkPkgs system;
in
with pkgs; {
inherit (unstable) hello;
}
);
} // flake-utils.lib.eachDefaultSystem (system:
let
pkgs = mkPkgs system;
in
{
formatter = pkgs.alejandra;
devShells = {
default = pkgs.mkShell {
name = "home-manager";
buildInputs = with pkgs; [
inputs.home-manager.packages.${system}.default
];
};
};
});
}