add templates for host specific and global overlays

This commit is contained in:
2026-04-25 10:59:21 +02:00
parent 6ce78e164c
commit c8806e3676
6 changed files with 38 additions and 22 deletions

View File

@@ -21,21 +21,23 @@ let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
pkgs-unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
pkgs-stable = pkgs;
pkgs-kabbone = import ../packages {
inherit system;
inherit pkgs;
pkgs = import nixpkgs { inherit system; config.allowUnfree = true; };
};
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
# Prefer host-specific overlays over a global one here.
# Set nixpkgs.overlays inside the host's own module (e.g. hosts/desktop/default.nix)
# so only that host's pkgs is affected. Packages can be imported inline —
# no specialArgs needed. See hosts/desktop/default.nix for an example.
};
# Helper: returns [hm-module, config-attrset] for the modules list.
@@ -55,7 +57,7 @@ in
{
hades = lib.nixosSystem { # Desktop profile
inherit system;
specialArgs = { inherit inputs pkgs-stable user location nixos-hardware agenix microvm nixpkgs lanzaboote pkgs-kabbone; };
specialArgs = { inherit inputs user location nixos-hardware agenix microvm nixpkgs lanzaboote; };
modules = [
agenix.nixosModules.default
microvm.nixosModules.host
@@ -71,7 +73,7 @@ in
lifebook = lib.nixosSystem { # Laptop profile
inherit system;
specialArgs = { inherit inputs pkgs-stable user location nixos-hardware agenix lanzaboote; };
specialArgs = { inherit inputs user location nixos-hardware agenix lanzaboote; };
modules = [
agenix.nixosModules.default
lanzaboote.nixosModules.lanzaboote
@@ -84,7 +86,7 @@ in
steamdeck = nixpkgs-unstable.lib.nixosSystem { # steamdeck profile
inherit system;
specialArgs = { inherit inputs pkgs-stable user location nixos-hardware agenix jovian-nixos lanzaboote; };
specialArgs = { inherit inputs pkgs user location nixos-hardware agenix jovian-nixos lanzaboote; };
modules = [
agenix.nixosModules.default
jovian-nixos.nixosModules.default
@@ -121,7 +123,7 @@ in
jupiter = lib.nixosSystem { # Server profile
inherit system;
specialArgs = { inherit inputs user location nixos-hardware agenix pkgs-kabbone; };
specialArgs = { inherit inputs user location nixos-hardware agenix; };
modules = [
agenix.nixosModules.default
./jupiter