First commit

This commit is contained in:
2026-02-22 17:28:02 +01:00
parent 7a70268785
commit 6bacf1878e
9011 changed files with 114470 additions and 0 deletions
+65
View File
@@ -0,0 +1,65 @@
{
description = "NixOS baseline everywhere + per-host exceptions + HM deviations";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager, ... }:
let
lib = nixpkgs.lib;
# Helper: make a NixOS system for a host
mkHost =
{ hostname
, system ? "x86_64-linux"
, username ? "henrov"
}:
lib.nixosSystem {
inherit system;
modules = [
# --- Host entrypoint ---
./hosts/${hostname}/configuration.nix
# --- Shared baseline for ALL machines ---
./modules/nixos/base.nix
# --- Home Manager as a NixOS module ---
home-manager.nixosModules.home-manager
# --- HM integration settings ---
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
# Your user HM entrypoint
home-manager.users.${username} = import ./home/${username}/home.nix;
}
];
specialArgs = {
inherit self hostname username;
};
};
in
{
nixosConfigurations = {
traveldroid = mkHost {
hostname = "traveldroid";
system = "x86_64-linux";
username = "henrov";
};
# Add more hosts like this:
# workstation = mkHost { hostname = "workstation"; system = "x86_64-linux"; username = "henrov"; };
# laptop = mkHost { hostname = "laptop"; system = "x86_64-linux"; username = "henrov"; };
};
};
}