nix-config/flake.nix

75 lines
2 KiB
Nix
Raw Normal View History

2024-03-24 17:39:49 -05:00
{
description = "Nix config for both home-manager and nixos";
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-03-24 17:39:49 -05:00
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
home-manager,
nixvim,
...
} @ inputs: let
inherit (self) outputs;
2024-04-22 21:45:38 -05:00
forAllSystems = nixpkgs.lib.genAttrs [
"x86_64-linux"
"aarch64-linux"
];
2024-03-24 17:39:49 -05:00
in {
2024-04-22 21:45:38 -05:00
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
devShells = forAllSystems (
system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
default = pkgs.mkShell {
packages = with pkgs; [
just
];
};
}
);
2024-03-24 17:39:49 -05:00
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
2024-04-04 18:44:59 -05:00
archlaptop-vm = import ./hosts/archlaptop-vm {inherit inputs outputs;};
workstation-vm = import ./hosts/workstation-vm {inherit inputs outputs;};
};
2024-03-24 17:39:49 -05:00
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
2024-03-24 17:39:49 -05:00
"gabe@archlaptop" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;};
modules = [
./hosts/gabe-archlaptop.nix
nixvim.homeManagerModules.nixvim
];
};
"gabe@gv-workstation" = home-manager.lib.homeManagerConfiguration {
2024-03-25 09:51:57 -05:00
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;};
modules = [
./hosts/gabe-gv-workstation.nix
2024-03-25 09:51:57 -05:00
nixvim.homeManagerModules.nixvim
];
};
2024-03-24 17:39:49 -05:00
};
};
}