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-04-01 00:42:33 +02:00
|
|
|
|
2024-03-24 23:39:49 +01:00
|
|
|
nixvim = {
|
|
|
|
url = "github:nix-community/nixvim";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
home-manager,
|
|
|
|
nixvim,
|
|
|
|
...
|
|
|
|
} @ inputs: let
|
|
|
|
inherit (self) outputs;
|
2024-04-23 04:45:38 +02:00
|
|
|
forAllSystems = nixpkgs.lib.genAttrs [
|
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-linux"
|
|
|
|
];
|
2024-03-24 23:39:49 +01:00
|
|
|
in {
|
2024-04-23 04:45:38 +02: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 23:39:49 +01:00
|
|
|
# NixOS configuration entrypoint
|
|
|
|
# Available through 'nixos-rebuild --flake .#your-hostname'
|
2024-03-25 01:41:56 +01:00
|
|
|
nixosConfigurations = {
|
2024-04-05 01:44:59 +02:00
|
|
|
archlaptop-vm = import ./hosts/archlaptop-vm {inherit inputs outputs;};
|
2024-04-04 00:50:53 +02:00
|
|
|
workstation-vm = import ./hosts/workstation-vm {inherit inputs outputs;};
|
2024-03-25 01:41:56 +01:00
|
|
|
};
|
2024-03-24 23:39:49 +01:00
|
|
|
|
|
|
|
# Standalone home-manager configuration entrypoint
|
|
|
|
# Available through 'home-manager --flake .#your-username@your-hostname'
|
2024-04-05 02:50:47 +02:00
|
|
|
homeConfigurations = {
|
2024-05-05 20:12:48 +02:00
|
|
|
"gabe@archlaptop" = import ./hosts/gabe-archlaptop.nix {inherit inputs outputs;};
|
|
|
|
"gabe@gv-workstation" = import ./hosts/gabe-gv-workstation.nix {inherit inputs outputs;};
|
2024-03-24 23:39:49 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|