nix-config/flake.nix

64 lines
2 KiB
Nix
Raw Normal View History

2024-03-24 23:39:49 +01: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 23:39:49 +01:00
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
# Shameless plug: looking for a way to nixify your themes and make
# everything match nicely? Try nix-colors!
# nix-colors.url = "github:misterio77/nix-colors";
};
outputs = {
self,
nixpkgs,
home-manager,
nixvim,
...
} @ inputs: let
inherit (self) outputs;
in {
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
2024-04-05 01:44:59 +02:00
archlaptop-vm = import ./hosts/archlaptop-vm {inherit inputs outputs;};
workstation-vm = import ./hosts/workstation-vm {inherit inputs outputs;};
};
2024-03-24 23:39:49 +01:00
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
2024-03-24 23:39:49 +01:00
"gabe@archlaptop" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;};
# > Our main home-manager configuration file <
modules = [
./hosts/gabe-archlaptop.nix
nixvim.homeManagerModules.nixvim
];
};
"gabe@gv-workstation" = home-manager.lib.homeManagerConfiguration {
2024-03-25 15:51:57 +01:00
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;};
# > Our main home-manager configuration file <
modules = [
./hosts/gabe-gv-workstation.nix
2024-03-25 15:51:57 +01:00
nixvim.homeManagerModules.nixvim
];
};
2024-03-24 23:39:49 +01:00
};
};
}