nix-config/flake.nix

78 lines
2.5 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";
};
# 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 = {
archlaptop-vm = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {inherit inputs outputs;};
# > Our main nixos configuration file <
modules = [
./hosts/archlaptop-vm/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.gabe = import ./hosts/archlaptop-vm/home.nix;
home-manager.extraSpecialArgs = {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'
homeConfiguration = {
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;};
# > Our main home-manager configuration file <
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;};
# > Our main home-manager configuration file <
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
};
};
}